code: def _create_bin_edges(x, bins, log_bins, floor):
      xmax = x.max()
      xmin = x.min()
      if log_bins is False:
          if floor is False:
              bin_edges = np.linspace(xmin, xmax, bins)
          else:
              bin_edges = np.unique(
                  np.floor(np.linspace(xmin, xmax, bins))
              )
              bin_edges[-1] = xmax
      else:
          log_xmin = np.log10(xmin)
          log_xmax = np.log10(xmax)
          bins = int(np.ceil((log_xmax - log_xmin) * bins))
          if floor is False:
              bin_edges = np.logspace(log_xmin, log_xmax, bins)
          else:
              bin_edges = np.unique(
                  np.floor(np.logspace(log_xmin, log_xmax, bins))
              )
              bin_edges[-1] = xmax
  
      return bin_edges
  
imports: from collections.abc import Iterable
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: _create_bin_edges(x, bins, log_bins, floor) and returns: bin_edges