code: def test_get_consistent_numpy_2dgrids():
      """Test extraction of number of entries for 2d hists
  
      When first making bin_edges of input histograms consistent to each other.
      """
      df1 = pd.DataFrame(
          {
              "A": [0, 1, 2, 3, 4, 3, 2, 1, 1, 1],
              "C": [
                  "f1",
                  "f3",
                  "f4",
                  "f3",
                  "f4",
                  "f2",
                  "f2",
                  "f1",
                  "f3",
                  "f4",
              ],
          }
      )
      df2 = pd.DataFrame(
          {
              "A": [2, 3, 4, 5, 7, 4, 6, 5, 7, 8],
              "C": [
                  "f7",
                  "f3",
                  "f5",
                  "f8",
                  "f9",
                  "f2",
                  "f3",
                  "f6",
                  "f7",
                  "f7",
              ],
          }
      )
  
      # building 1d-, 2d-, and 3d-histogram (iteratively)
      hist0 = hg.Categorize(unit("C"))
      hist1 = hg.SparselyBin(
          origin=0.0, binWidth=1.0, quantity=unit("A"), value=hist0
      )
      hist2 = hg.SparselyBin(
          origin=0.0, binWidth=1.0, quantity=unit("A"), value=hist0
      )
  
      # fill them
      hist0.fill.numpy(df1)
      hist1.fill.numpy(df1)
      hist2.fill.numpy(df2)
  
      with pytest.raises(ValueError) as e:
          get_consistent_numpy_2dgrids([hist0, hist0])
  
      assert (
          e.value.args[0]
          == "Input histogram only has 1 dimensions (<2). Cannot compute 2d-grid."
      )
  
      grid2d_list = get_consistent_numpy_2dgrids([hist1, hist2])
  
      g1 = np.asarray(
          [
              [1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
              [0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0],
              [0.0, 2.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0],
              [0.0, 1.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0],
              [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
              [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
              [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
              [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
              [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
          ]
      )
      g2 = np.asarray(
          [
              [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
              [0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0],
              [0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0],
              [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
              [0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0],
              [0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0],
              [0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0],
              [0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0],
              [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0],
          ]
      )
      grid2d_comp = [g1, g2]
  
      for i in range(2):
          assert (grid2d_list[i] == grid2d_comp[i]).all()
  
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 10 for calling a global function with example usage: test_get_consistent_numpy_2dgrids() without return types