code: def replace_match(
      file: str, line: str, provider: str, version: str
  ) -> str | None:
      for index, matcher in enumerate(
          [EXAMPLE_DAGS_URL_MATCHER, SYSTEM_TESTS_URL_MATCHER]
      ):
          match = matcher.match(line)
          if match:
              url_path_to_dir = match.group(4)
              branch = match.group(3)
              if branch.startswith("providers-") and branch.endswith(
                  f"/{version}"
              ):
                  console.print(
                      f"[green]Already corrected[/]: {provider}:{version}"
                  )
                  continue
              system_tests_url = (
                  f"https://github.com/apache/airflow/tree/providers-{provider}/{version}"
                  f"/tests/system/providers/{url_path_to_dir}"
              )
              example_dags_url = (
                  f"https://github.com/apache/airflow/tree/providers-{provider}/{version}"
                  f"/airflow/providers/{url_path_to_dir}/example_dags"
              )
              if check_if_url_exists(system_tests_url) and index == 1:
                  new_line = re.sub(
                      matcher, r"\1" + system_tests_url + r"\5", line
                  )
              elif check_if_url_exists(example_dags_url) and index == 0:
                  new_line = re.sub(
                      matcher, r"\1" + example_dags_url + r"\5", line
                  )
              else:
                  console.print(
                      f"[yellow] Neither example dags nor system tests folder"
                      f" exists for {provider}:{version} -> skipping:[/]"
                  )
                  console.print(line)
                  return line
              if line != new_line:
                  console.print(
                      f"[yellow] Replacing in {file}[/]\n{line.strip()}\n{new_line.strip()}"
                  )
                  return new_line
      return line
  
file_path: airflow/dev/example_dags/update_example_dags_paths.py
imports: from __future__ import annotations
  import os
  import re
  from pathlib import Path
  import requests
  from rich.console import Console
  from rich.progress import Progress
label_desc: Use image node_id 2 for calling a global function with example usage: replace_match(file, line, provider, version) and returns: line, new_line, line