code: def test_split_hist_along_first_dimension():
      hist1, hist2, hist3 = get_histograms()
  
      split3a = split_hist_along_first_dimension(
          hist=hist3,
          xname="x",
          yname="y",
          short_keys=True,
          convert_time_index=True,
      )
      split3b = split_hist_along_first_dimension(
          hist=hist3,
          xname="x",
          yname="y",
          short_keys=True,
          convert_time_index=False,
      )
      split3c = split_hist_along_first_dimension(
          hist=hist3,
          xname="x",
          yname="y",
          short_keys=False,
          convert_time_index=True,
      )
  
      keys3a = list(split3a.keys())
      keys3b = list(split3b.keys())
      keys3c = list(split3c.keys())
  
      check3a = [
          pd.Timestamp("2009-01-01 12:00:00"),
          pd.Timestamp("2009-01-02 12:00:00"),
          pd.Timestamp("2009-01-05 12:00:00"),
          pd.Timestamp("2009-01-06 12:00:00"),
          pd.Timestamp("2009-01-07 12:00:00"),
      ]
      check3b = [
          1.2308112e18,
          1.2308976e18,
          1.2311568e18,
          1.2312432e18,
          1.2313296e18,
      ]
      check3c = [
          "y[x=2009-01-01 12:00:00]",
          "y[x=2009-01-02 12:00:00]",
          "y[x=2009-01-05 12:00:00]",
          "y[x=2009-01-06 12:00:00]",
          "y[x=2009-01-07 12:00:00]",
      ]
  
      np.testing.assert_array_equal(keys3a, check3a)
      np.testing.assert_array_equal(keys3b, check3b)
      np.testing.assert_array_equal(keys3c, check3c)
  
      split2a = split_hist_along_first_dimension(
          hist=hist2,
          xname="x",
          yname="y",
          short_keys=True,
          convert_time_index=True,
      )
      split2b = split_hist_along_first_dimension(
          hist=hist2,
          xname="x",
          yname="y",
          short_keys=True,
          convert_time_index=False,
      )
      split2c = split_hist_along_first_dimension(
          hist=hist2,
          xname="x",
          yname="y",
          short_keys=False,
          convert_time_index=False,
      )
  
      keys2a = list(split2a.keys())
      keys2b = list(split2b.keys())
      keys2c = list(split2c.keys())
  
      check2a = [0.5, 1.5, 2.5, 3.5, 4.5]
      check2b = [0.5, 1.5, 2.5, 3.5, 4.5]
      check2c = [
          "y[x=0.5]",
          "y[x=1.5]",
          "y[x=2.5]",
          "y[x=3.5]",
          "y[x=4.5]",
      ]
  
      np.testing.assert_array_equal(keys2a, check2a)
      np.testing.assert_array_equal(keys2b, check2b)
      np.testing.assert_array_equal(keys2c, check2c)
  
      split1a = split_hist_along_first_dimension(
          hist=hist1,
          xname="x",
          yname="y",
          short_keys=True,
          convert_time_index=True,
      )
      split1b = split_hist_along_first_dimension(
          hist=hist1,
          xname="x",
          yname="y",
          short_keys=True,
          convert_time_index=False,
      )
      split1c = split_hist_along_first_dimension(
          hist=hist1,
          xname="x",
          yname="y",
          short_keys=False,
          convert_time_index=False,
      )
  
      keys1a = list(split1a.keys())
      keys1b = list(split1b.keys())
      keys1c = list(split1c.keys())
  
      check1a = ["foo1", "foo2", "foo3", "foo4", "foo5"]
      check1b = ["foo1", "foo2", "foo3", "foo4", "foo5"]
      check1c = ["x=foo1", "x=foo2", "x=foo3", "x=foo4", "x=foo5"]
  
      np.testing.assert_array_equal(keys1a, check1a)
      np.testing.assert_array_equal(keys1b, check1b)
      np.testing.assert_array_equal(keys1c, check1c)
  
      # look at the split hists
      hs3 = split3a[keys3a[0]]
      hs2 = split2a[keys2a[0]]
      hs1 = split1a[keys1a[0]]
  
      assert hs3.n_dim == 2
      assert hs2.n_dim == 1
      assert isinstance(hs3, hg.Bin)
      assert isinstance(hs2, hg.Categorize)
      assert isinstance(hs1, hg.Count)
      assert hs3.contentType == "Categorize"
      assert hs2.contentType == "Count"
  
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 7 for calling a global function with example usage: test_split_hist_along_first_dimension() without return types