code: def make_all_histogram_edges(feature_bounds, histogram_weights):
      if feature_bounds is None:
          msg = "feature_bounds is None"
          _log.error(msg)
          raise ValueError(msg)
  
      if histogram_weights is None:
          msg = "histogram_weights is None"
          _log.error(msg)
          raise ValueError(msg)
  
      if len(feature_bounds) != len(histogram_weights):
          msg = "feature_bounds and histogram_weights have different lengths"
          _log.error(msg)
          raise ValueError(msg)
  
      ret = [None] * len(histogram_weights)
      for idx in range(len(ret)):
          min_feature_val = feature_bounds[idx, 0]
          max_feature_val = feature_bounds[idx, 1]
  
          if not isnan(min_feature_val) and not isnan(max_feature_val):
              histogram_bin_weights = histogram_weights[idx]
              if histogram_bin_weights is None:
                  msg = "histogram_weights[idx] is None"
                  _log.error(msg)
                  raise ValueError(msg)
  
              ret[idx] = _make_histogram_edges(
                  min_feature_val,
                  max_feature_val,
                  histogram_bin_weights,
              )
      return ret
  
imports: from math import isnan
  import logging
  import numpy
  from ._native import Native
label_desc: Use image node_id 2 for calling a global function with example usage: make_all_histogram_edges(feature_bounds, histogram_weights) and returns: ret