code: def test_hists_stability_metrics():
      settings = Settings(reference_type="rolling")
      settings.comparison.window = 5
      settings.features = [
          "date:bankrupt",
          "date:country",
          "date:bankrupt",
          "date:A_score",
          "date:A_score:num_employees",
      ]
  
      # get histograms
      pipeline = Pipeline(
          modules=[
              JsonReader(
                  file_path=resources.data("example_histogram.json"),
                  store_key="hists",
              )
          ]
      )
      datastore = pipeline.transform(datastore={})
      hists = datastore["hists"]
  
      # generate metrics
      ds = stability_metrics(hists, settings=settings)
  
      cols = ["profiles", "comparisons", "traffic_lights", "alerts"]
      for c in cols:
          assert c in list(ds.keys())
  
file_path: popmon/tests/popmon/pipeline/test_metrics.py
imports: import pandas
  import pytest
  from popmon import resources
  from popmon.base import Pipeline
  from popmon.config import Settings
  from popmon.io import JsonReader
  from popmon.pipeline.metrics import df_stability_metrics, stability_metrics
label_desc: Use image node_id 1 for calling a global function with example usage: test_hists_stability_metrics() without return types