code: def check_dockerfile():
      lines = (
          (AIRFLOW_SOURCES_ROOT_PATH / "Dockerfile")
          .read_text()
          .splitlines()
      )
      extras_list = None
      for line in lines:
          if line.startswith("ARG AIRFLOW_EXTRAS="):
              extras_list = (
                  line.split("=")[1].replace('"', "").split(",")
              )
              if check_list_sorted(
                  extras_list, "Dockerfile's AIRFLOW_EXTRAS", errors
              ):
                  builds_args_content = (
                      BUILD_ARGS_REF_PATH.read_text().splitlines(
                          keepends=True
                      )
                  )
                  result = get_replaced_content(
                      builds_args_content,
                      extras_list,
                      START_RST_LINE,
                      END_RST_LINE,
                      "* ",
                      "",
                      add_empty_lines=True,
                  )
                  BUILD_ARGS_REF_PATH.write_text("".join(result))
                  global_constants_path = (
                      GLOBAL_CONSTANTS_PATH.read_text().splitlines(
                          keepends=True
                      )
                  )
                  result = get_replaced_content(
                      global_constants_path,
                      extras_list,
                      START_PYTHON_LINE,
                      END_PYTHON_LINE,
                      '    "',
                      '",',
                      add_empty_lines=False,
                  )
                  GLOBAL_CONSTANTS_PATH.write_text("".join(result))
                  return
      if not extras_list:
          errors.append(
              "Something is wrong. Dockerfile does not contain AIRFLOW_EXTRAS"
          )
  
imports: from __future__ import annotations
  import sys
  from pathlib import Path
  from rich import print
  from common_precommit_utils import AIRFLOW_SOURCES_ROOT_PATH, check_list_sorted
label_desc: Use image node_id 2 for calling a global function with example usage: check_dockerfile() without return types