code: def split_hist_along_first_dimension(
      hist,
      xname: str = "x",
      yname: str = "y",
      short_keys: bool = True,
      convert_time_index: bool = True,
      filter_empty_split_hists: bool = True,
  ):
      """Split (multi-dimensional) hist into sub-hists along x-axis
  
      Function to split a (multi-dimensional) histogram into sub-histograms
      along the first dimension encountered.
  
      :param str xname: name of x-axis. default is x.
      :param str yname: name of y-axis. default is y.
      :param bool short_keys: if false, use long descriptive dict keys.
      :param bool convert_time_index: if first dimension is a datetime, convert to pandas timestamp. default is true.
      :param bool filter_empty_split_hists: filter out empty sub-histograms after splitting. default is True.
      :returns: sorted dictionary of sub-histograms, with as keys the x-axis name and bin-number
      :rtype: SortedDict
      """
      hdict = {}
  
      # nothing special to do
      if hist.n_dim == 0:
          hdict["dummy"] = hist
          return hdict
  
      centers, values = get_bin_centers(hist)
  
      # MB 20191004: this happens rarely, but, in Histogrammar, if a multi-dim histogram contains *only*
      #   nans, overflows, or underflows for x, its sub-dimensional histograms (y, z, etc) do not get filled
      #   and/or are created. For sparselybin histograms this screws up the event-count, and evaluation of n-dim and
      #   datatype, so that the comparison of split-histograms along the x-axis gives inconsistent histograms.
      #   In this step we filter out any such empty sub-histograms, to ensure that
      #   all left-over sub-histograms are consistent with each other.
      if filter_empty_split_hists:
          centers, values = _filter_empty_split_hists(centers, values)
  
      for name, val in zip(centers, values):
          hname = _edit_name(
              hist, name, xname, yname, convert_time_index, short_keys
          )
          hdict[hname] = val
  
      return hdict
  
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 10 for calling a global function with example usage: split_hist_along_first_dimension(hist, xname, yname, short_keys, convert_time_index, filter_empty_split_hists) and returns: hdict, hdict