code: def test_hist_compare():
      hist_list = [
          "date:country",
          "date:bankrupt",
          "date:num_employees",
          "date:A_score",
          "date:A_score:num_employees",
      ]
  
      pipeline = Pipeline(
          modules=[
              JsonReader(
                  file_path=resources.data("example_histogram.json"),
                  store_key="example_hist",
              ),
              HistSplitter(
                  read_key="example_hist",
                  store_key="output_hist",
                  features=hist_list,
              ),
              ApplyFunc(
                  apply_to_key="output_hist",
                  apply_funcs=[
                      {
                          "func": expanding_hist,
                          "shift": 1,
                          "suffix": "sum",
                          "entire": True,
                          "hist_name": "histogram",
                      }
                  ],
              ),
              ApplyFunc(
                  apply_to_key="output_hist",
                  assign_to_key="comparison",
                  apply_funcs=[
                      {
                          "func": hist_compare,
                          "hist_name1": "histogram",
                          "hist_name2": "histogram_sum",
                          "suffix": "",
                          "axis": 1,
                      }
                  ],
              ),
          ]
      )
      datastore = pipeline.transform(datastore={})
  
      df = datastore["comparison"]["num_employees"]
      np.testing.assert_array_equal(
          df["chi2"].values[-1], 0.7017543859649122
      )
  
file_path: popmon/tests/popmon/analysis/comparison/test_hist_comparer.py
imports: import numpy
  import pandas
  import pytest
  from popmon import resources
  from popmon.analysis.apply_func import ApplyFunc
  from popmon.analysis.comparison.hist_comparer import ExpandingHistComparer, ReferenceHistComparer, RollingHistComparer, hist_compare
  from popmon.analysis.functions import expanding_hist
  from popmon.base import Pipeline
  from popmon.hist.hist_splitter import HistSplitter
  from popmon.io import JsonReader
label_desc: Use image node_id 1 for calling a global function with example usage: test_hist_compare() without return types