code: def get_report_pipeline_class(
      reference_type: Literal[
          "self", "external", "rolling", "expanding", "self_split"
      ],
      reference,
  ):
      _report_pipeline = {
          "self": SelfReference,
          "external": ExternalReference,
          "rolling": RollingReference,
          "expanding": ExpandingReference,
          "self_split": ExternalReference,
      }
      reference_types = list(_report_pipeline.keys())
      if reference_type not in reference_types:
          raise ValueError(
              f"reference_type should be one of {reference_types!s}."
          )
      if reference_type == "external" and not isinstance(
          reference, dict
      ):
          raise TypeError(
              "reference should be a dict of histogrammar histograms."
          )
  
      return _report_pipeline[reference_type]
  
imports: from pathlib import Path
  from typing_extensions import Literal
  from popmon.base import Pipeline
  from popmon.config import Settings
  from popmon.io import FileWriter
  from popmon.pipeline.metrics_pipelines import ExpandingReferenceMetricsPipeline, ExternalReferenceMetricsPipeline, RollingReferenceMetricsPipeline, SelfReferenceMetricsPipeline
  from popmon.visualization import AlertSectionGenerator, HistogramSection, ReportGenerator, SectionGenerator, TrafficLightSectionGenerator
  from popmon.visualization.overview_section import OverviewSectionGenerator
label_desc: Use image node_id 1 for calling a global function with example usage: get_report_pipeline_class(reference_type, reference) and returns: _report_pipeline