code: def assert_plan_snapshot_text_equal(
      request: FixtureRequest,
      mf_test_session_state: MetricFlowTestSessionState,
      plan: PlanT,
      plan_snapshot_text: str,
      plan_snapshot_file_extension: str = ".xml",
      exclude_line_regex: Optional[str] = None,
      incomparable_strings_replacement_function: Optional[
          Callable[[str], str]
      ] = None,
      additional_sub_directories_for_snapshots: Tuple[str, ...] = (),
  ) -> None:
      """Checks if the given plan text is equal to the one that's saved for comparison.
  
      * The location of the file is automatically generated based on the test and the plan's ID.
      * This may create a new saved plan file or overwrite the existing one, depending on the configuration.
      * replace_incomparable_strings is used to replace strings in the plan text before comparison. Useful for making
        plans consistent when there are strings that vary between runs and shouldn't be compared.
      * additional_sub_directories_for_snapshots is used to specify additional sub-directories (in the automatically
        generated directory) where plan outputs should reside.
  
      TODO: Make this more generic by renaming plan -> DAG.
      """
      assert_snapshot_text_equal(
          request=request,
          mf_test_session_state=mf_test_session_state,
          group_id=plan.__class__.__name__,
          snapshot_id=str(plan.dag_id),
          snapshot_text=plan_snapshot_text,
          snapshot_file_extension=plan_snapshot_file_extension,
          exclude_line_regex=exclude_line_regex,
          incomparable_strings_replacement_function=incomparable_strings_replacement_function,
          additional_sub_directories_for_snapshots=additional_sub_directories_for_snapshots,
      )
  
imports: from __future__ import annotations
  import difflib
  import logging
  import os
  import re
  import webbrowser
  from typing import Any, Callable, List, Optional, Tuple, TypeVar
  import tabulate
  from _pytest.fixtures import FixtureRequest
  from dbt_semantic_interfaces.pretty_print import pformat_big_objects
  from metricflow.dag.mf_dag import MetricFlowDag
  from metricflow.dataflow.dataflow_plan import DataflowPlan
  from metricflow.dataflow.dataflow_plan_to_text import dataflow_plan_as_text
  from metricflow.execution.execution_plan import ExecutionPlan
  from metricflow.execution.execution_plan_to_text import execution_plan_to_text
  from metricflow.mf_logging.pretty_print import mf_pformat
  from metricflow.model.semantics.linkable_spec_resolver import LinkableElementSet
  from metricflow.naming.object_builder_scheme import ObjectBuilderNamingScheme
  from metricflow.protocols.sql_client import SqlClient
  from metricflow.specs.specs import InstanceSpecSet, LinkableSpecSet
  from metricflow.test.fixtures.setup_fixtures import MetricFlowTestSessionState, check_sql_engine_snapshot_marker
label_desc: Use image node_id 5 for calling a global function with example usage: assert_plan_snapshot_text_equal(request, mf_test_session_state, plan, plan_snapshot_text, plan_snapshot_file_extension, exclude_line_regex, incomparable_strings_replacement_function, additional_sub_directories_for_snapshots) without return types