code: def test_chi_squared1():
      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": roll_norm_hist_mean_cov,
                          "hist_name": "histogram",
                          "window": 5,
                          "shift": 1,
                          "suffix": "",
                          "entire": True,
                      }
                  ],
              ),
              ApplyFunc(
                  apply_to_key="output_hist",
                  apply_funcs=[
                      {
                          "func": relative_chi_squared,
                          "suffix": "",
                          "axis": 1,
                      }
                  ],
              ),
          ]
      )
      datastore = pipeline.transform(datastore={})
  
      assert "output_hist" in datastore
      for f in [
          "A_score",
          "A_score:num_employees",
          "bankrupt",
          "country",
          "num_employees",
      ]:
          assert f in datastore["output_hist"]
  
      df = datastore["output_hist"]["A_score"]
      np.testing.assert_almost_equal(df["chi2"].values[6], 4.25)
      df = datastore["output_hist"]["A_score:num_employees"]
      np.testing.assert_almost_equal(
          df["chi2"].values[-2], 2.1333333333333315
      )
      df = datastore["output_hist"]["bankrupt"]
      np.testing.assert_almost_equal(
          df["chi2"].values[6], 0.40000000000000024
      )
      df = datastore["output_hist"]["country"]
      np.testing.assert_almost_equal(
          df["chi2"].values[5], 0.8999999999999994
      )
      df = datastore["output_hist"]["num_employees"]
      np.testing.assert_almost_equal(
          df["chi2"].values[5], 0.849999999999999
      )
  
imports: import numpy
  import pandas
  import pytest
  from popmon import resources
  from popmon.analysis.apply_func import ApplyFunc
  from popmon.analysis.comparison import ExpandingNormHistComparer, ReferenceNormHistComparer, RollingNormHistComparer
  from popmon.analysis.functions import expand, expand_norm_hist_mean_cov, expanding_hist, normalized_hist_mean_cov, relative_chi_squared, roll, roll_norm_hist_mean_cov, rolling_hist
  from popmon.base import Pipeline
  from popmon.hist.hist_splitter import HistSplitter
  from popmon.io import JsonReader
label_desc: Use image node_id 8 for calling a global function with example usage: test_chi_squared1() without return types