code: def get_header_and_footer(
      extra_type: ExtraType, file_format: str
  ) -> tuple[str, str]:
      if file_format == "rst":
          return (
              f"  .. START {extra_type.value} EXTRAS HERE",
              f"  .. END {extra_type.value} EXTRAS HERE",
          )
      elif file_format == "txt":
          return (
              f"# START {extra_type.value} EXTRAS HERE",
              f"# END {extra_type.value} EXTRAS HERE",
          )
      else:
          raise Exception(
              f"Bad format {format} passed. Only rst and txt are supported"
          )
  
file_path: airflow/scripts/ci/pre_commit/pre_commit_insert_extras.py
imports: from __future__ import annotations
  import sys
  import textwrap
  from enum import Enum
  from pathlib import Path
  from common_precommit_utils import insert_documentation
label_desc: Use image node_id 1 for calling a global function with example usage: get_header_and_footer(extra_type, file_format) and returns: str, extra_type, str,  str, extra_type, str, str, extra_type, str,  str, extra_type, str