code: def create_metrics_pipeline(
      settings: Settings,
      reference=None,
      hists_key: str = "hists",
      **kwargs,
  ):
      # configuration and datastore for report pipeline
      cfg = {
          "hists_key": hists_key,
          "settings": settings,
          **kwargs,
      }
  
      # execute reporting pipeline
      cls = get_metrics_pipeline_class(
          settings.reference_type, reference
      )
      pipeline = cls(**cfg)
      return pipeline
  
imports: from __future__ import annotations
  from popmon.alerting import AlertsSummary, DynamicBounds, StaticBounds, TrafficLightAlerts, traffic_light_summary
  from popmon.analysis.apply_func import ApplyFunc
  from popmon.analysis.comparison.hist_comparer import ExpandingHistComparer, PreviousHistComparer, ReferenceHistComparer, RollingHistComparer
  from popmon.analysis.functions import rolling_lr_zscore
  from popmon.analysis.profiling import HistProfiler
  from popmon.analysis.profiling.pull_calculator import ExpandingPullCalculator, ReferencePullCalculator, RefMedianMadPullCalculator, RollingPullCalculator
  from popmon.base import Module, Pipeline
  from popmon.config import Settings
  from popmon.hist.hist_splitter import HistSplitter
  from .timing import Timing
label_desc: Use image node_id 2 for calling a global function with example usage: create_metrics_pipeline(settings, reference, hists_key) and returns: pipeline