code: def test_prepare_2dgrid():
      """Test preparation of grid for extraction of number of entries for 2d hists"""
      df, hc1, hc2, hc3 = get_test_histograms1()
  
      # building 1d-, 2d-, and 3d-histogram (iteratively)
      hist1 = hg.Categorize(unit("C"))
      hist2 = hg.Bin(5, 0, 5, unit("A"), value=hist1)
      hist3 = hg.SparselyBin(
          origin=pd.Timestamp("2009-01-01").value,
          binWidth=pd.Timedelta(days=1).value,
          quantity=unit("date"),
          value=hist2,
      )
      # fill them
      hist1.fill.numpy(df)
      hist2.fill.numpy(df)
      hist3.fill.numpy(df)
  
      xkeys1, ykeys1 = prepare_2dgrid(hist1)
      xkeys2, ykeys2 = prepare_2dgrid(hist2)
      xkeys3, ykeys3 = prepare_2dgrid(hist3)
  
      np.testing.assert_array_equal(xkeys1, [])
      np.testing.assert_array_equal(ykeys1, [])
      np.testing.assert_array_equal(xkeys2, [0, 1, 2, 3, 4])
      np.testing.assert_array_equal(
          ykeys2, ["foo1", "foo2", "foo3", "foo4", "foo5"]
      )
      np.testing.assert_array_equal(xkeys3, [0, 1, 4, 5, 6])
      np.testing.assert_array_equal(ykeys3, [0, 1, 2, 3, 4])
  
file_path: popmon/tests/popmon/analysis/test_hist_numpy.py
imports: import histogrammar
  import numpy
  import pandas
  import pytest
  from popmon.analysis.hist_numpy import assert_similar_hists, check_similar_hists, get_2dgrid, get_consistent_numpy_1dhists, get_consistent_numpy_2dgrids, get_consistent_numpy_entries, get_contentType, prepare_2dgrid, set_2dgrid
label_desc: Use image node_id 7 for calling a global function with example usage: test_prepare_2dgrid() without return types