code: def test_expand_norm_hist_mean_cov():
      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": expand_norm_hist_mean_cov,
                          "hist_name": "histogram",
                          "shift": 1,
                          "suffix": "",
                          "entire": True,
                      }
                  ],
              ),
          ]
      )
      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"]["num_employees"]
      mean = df["histogram_mean"].values[-2]
  
      check = np.array(
          [
              0.56666667,
              0.03333333,
              0.03333333,
              0.06666667,
              0.06666667,
              0.06666667,
              0.03333333,
              0.06666667,
              0.06666667,
          ]
      )
  
      np.testing.assert_array_almost_equal(mean, check)
  
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 7 for calling a global function with example usage: test_expand_norm_hist_mean_cov() without return types