code: def test_project_split2dhist_on_axis():
      df = get_test_data()
  
      histA = hg.Bin(5, 0, 5, unit("A"))
      histC = hg.Categorize(unit("C"))
      hist1 = hg.Categorize(unit("C"), value=histA)
      hist2 = hg.Bin(5, 0, 5, unit("A"), value=histC)
  
      histDCA = hg.SparselyBin(
          origin=pd.Timestamp("2009-01-01").value,
          binWidth=pd.Timedelta(days=1).value,
          quantity=unit("date"),
          value=hist1,
      )
      histDAC = hg.SparselyBin(
          origin=pd.Timestamp("2009-01-01").value,
          binWidth=pd.Timedelta(days=1).value,
          quantity=unit("date"),
          value=hist2,
      )
  
      histDA = hg.SparselyBin(
          origin=pd.Timestamp("2009-01-01").value,
          binWidth=pd.Timedelta(days=1).value,
          quantity=unit("date"),
          value=histA,
      )
      histDC = hg.SparselyBin(
          origin=pd.Timestamp("2009-01-01").value,
          binWidth=pd.Timedelta(days=1).value,
          quantity=unit("date"),
          value=histC,
      )
  
      for hist in [histDA, histDC, histDCA, histDAC]:
          hist.fill.numpy(df)
  
      # split along date axis
      splitAC = split_hist_along_first_dimension(
          hist=histDAC,
          xname="x",
          yname="y",
          short_keys=True,
          convert_time_index=True,
      )
      splitCA = split_hist_along_first_dimension(
          hist=histDCA,
          xname="x",
          yname="y",
          short_keys=True,
          convert_time_index=True,
      )
      splitA0 = split_hist_along_first_dimension(
          hist=histDA,
          xname="x",
          yname="y",
          short_keys=True,
          convert_time_index=True,
      )
      splitC0 = split_hist_along_first_dimension(
          hist=histDC,
          xname="x",
          yname="y",
          short_keys=True,
          convert_time_index=True,
      )
  
      splitA1 = project_split2dhist_on_axis(splitAC, "x")
      splitA2 = project_split2dhist_on_axis(splitCA, "y")
      splitC1 = project_split2dhist_on_axis(splitAC, "y")
      splitC2 = project_split2dhist_on_axis(splitCA, "x")
  
      assert len(splitA0) == len(splitA1)
      assert len(splitA0) == len(splitA2)
  
      for key, h0 in splitA0.items():
          assert key in splitA1
          assert key in splitA2
          h1 = splitA1[key]
          h2 = splitA2[key]
          bin_edges0 = h0.bin_edges()
          bin_edges1 = h1.bin_edges()
          bin_edges2 = h2.bin_edges()
          bin_entries0 = h0.bin_entries()
          bin_entries1 = h1.bin_entries()
          bin_entries2 = h2.bin_entries()
          np.testing.assert_array_equal(bin_edges0, bin_edges1)
          np.testing.assert_array_equal(bin_edges0, bin_edges2)
          np.testing.assert_array_equal(bin_entries0, bin_entries1)
          np.testing.assert_array_equal(bin_entries0, bin_entries2)
  
      assert len(splitC0) == len(splitC1)
      assert len(splitC0) == len(splitC2)
  
      for key, h0 in splitC0.items():
          assert key in splitC1
          assert key in splitC2
          h1 = splitC1[key]
          h2 = splitC2[key]
          bin_labels0 = h0.bin_labels()
          bin_labels1 = h1.bin_labels()
          bin_labels2 = h2.bin_labels()
          bin_entries0 = h0.bin_entries()
          bin_entries1 = h1.bin_entries(bin_labels0)
          bin_entries2 = h2.bin_entries(bin_labels0)
          np.testing.assert_array_equal(
              sorted(bin_labels0), sorted(bin_labels1)
          )
          np.testing.assert_array_equal(
              sorted(bin_labels0), sorted(bin_labels2)
          )
          np.testing.assert_array_equal(bin_entries0, bin_entries1)
          np.testing.assert_array_equal(bin_entries0, bin_entries2)
  
file_path: popmon/tests/popmon/hist/test_histogram.py
imports: import histogrammar
  import numpy
  import pandas
  from popmon.hist.hist_utils import is_numeric, is_timestamp, project_on_x, project_split2dhist_on_axis, sparse_bin_centers_x, split_hist_along_first_dimension, sum_entries, sum_over_x
label_desc: Use image node_id 11 for calling a global function with example usage: test_project_split2dhist_on_axis() without return types