code: def sparse_bin_centers_x(hist):
      """Get x-axis bin centers of sparse histogram"""
      # note: want sorted keys for plotting
      keys = np.array(sorted(hist.bins.keys()))
      if hist.minBin is None or hist.maxBin is None:
          # number of bins is set to 1.
          centers = np.array([hist.origin + 0.5 * hist.binWidth])
      else:
          # default for filled histogram
          centers = hist.origin + (keys + 0.5) * hist.binWidth
      # note: so values is also sorted
      values = [hist.bins[key] for key in keys]
      return centers, values
  
file_path: popmon/popmon/hist/hist_utils.py
imports: import histogrammar
  import histogrammar.specialized
  import numpy
  import pandas
  from histogrammar.specialized import CategorizeHistogramMethods, HistogramMethods, SparselyHistogramMethods, SparselyTwoDimensionallyHistogramMethods, TwoDimensionallyHistogramMethods
  from histogrammar.util import get_hist_props
label_desc: Use image node_id 8 for calling a global function with example usage: sparse_bin_centers_x(hist) and returns: centers,  values