code: def test_df_stability_report_self():
      # Note that 2020 is a leap year (366 days), timedelta cannot account for this
      # if this is important for the analysis, use an IDs for each year
      time_width = "365d"
      time_offset = "2020-1-1"
  
      # generate report directly from dataframe
      features = ["date:eyeColor", "date:latitude"]
      rep = df_stability_report(
          pytest.test_df,
          time_axis="date",
          reference_type="self",
          features=features,
          time_width=time_width,
          time_offset=time_offset,
      )
  
      # test that time_width and time_offset got picked up correctly.
      datastore = rep.datastore
      hists = datastore["hists"]
      bin_specs = get_bin_specs(hists)
  
      assert (
          pd.Timedelta(time_width).value
          == bin_specs["date:eyeColor"][0]["binWidth"]
      )
      assert (
          pd.Timestamp(time_offset).value
          == bin_specs["date:eyeColor"][0]["origin"]
      )
      assert (
          pd.Timedelta(time_width).value
          == bin_specs["date:latitude"][0]["binWidth"]
      )
      assert (
          pd.Timestamp(time_offset).value
          == bin_specs["date:latitude"][0]["origin"]
      )
  
file_path: popmon/tests/popmon/pipeline/test_report.py
imports: import pandas
  import pytest
  from popmon import resources
  from popmon.base import Pipeline
  from popmon.config import Settings
  from popmon.hist.filling import get_bin_specs
  from popmon.io import JsonReader
  from popmon.pipeline.report import df_stability_report, stability_report
label_desc: Use image node_id 3 for calling a global function with example usage: test_df_stability_report_self() without return types