code: def find_bin(self, value):
          
          ixbin = np.searchsorted(self.bin_left_edges, value, side="right")
          if ixbin == 0:
              return -1
          elif ixbin == self.bin_count:
              if value <= self.bin_right_edges[-1]:
                  return ixbin - 1
              else:
                  return self.bin_count
          elif value < self.bin_right_edges[ixbin - 1]:
              return ixbin - 1
          elif ixbin == self.bin_count:
              return self.bin_count
          else:
              return None
docs: Index of bin corresponding to a value.
  
          Parameters
          ----------
          value: float
              Value to be searched for.
  
          Returns
          -------
          int
              index of bin to which value belongs
              (-1=underflow, N=overflow, None=not found - inconsecutive)