code: def project_split2dhist_on_axis(splitdict, axis: str = "x"):
      """Project a split 2d-histogram onto one axis
  
      Project a 2d hist that's been split with function split_hist_along_first_dimension
      onto x or y axis.
  
      :param dict splitdict: input split histogram to be projected.
      :param str axis: name of axis to project on, should be x or y. default is x.
  
      :return: sorted dictionary of sub-histograms, with as keys the x-axis name and bin-number
      :rtype: SortedDict
      """
      if not isinstance(splitdict, dict):
          raise TypeError(
              f"splitdict: {type(splitdict)}, type should be a dictionary."
          )
      if axis not in ["x", "y"]:
          raise ValueError(f"axis: {axis}, can only be x or y.")
  
      hdict = {
          key: project_on_x(hxy) if axis == "x" else sum_over_x(hxy)
          for key, hxy in splitdict.items()
      }
  
      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 4 for calling a global function with example usage: project_split2dhist_on_axis(splitdict, axis) and returns: hdict