code: def bin(self, bins, labels=None):
          
          return dim(self, bin, bins, labels=labels)
docs: Bins continuous values.
  
          Bins continuous using the provided bins and assigns labels
          either computed from each bins center point or from the
          supplied labels.
  
          Args:
              bins: List or array containing the bin boundaries
              labels: List of labels to assign to each bin
                  If the bins are length N the labels should be length N-1