code: def verify_an_image(
      image_name: str,
      image_type: str,
      output: Output | None,
      slim_image: bool,
      extra_pytest_args: tuple[str, ...],
  ) -> tuple[int, str]:
      command_result = run_command(
          ["docker", "inspect", image_name],
          check=False,
          output=output,
      )
      if command_result.returncode != 0:
          get_console(output=output).print(
              f"[error]Error when inspecting {image_type} image: {command_result.returncode}[/]"
          )
          return (
              command_result.returncode,
              f"Testing {image_type} python {image_name}",
          )
      pytest_args = ("-n", str(os.cpu_count()), "--color=yes")
      if image_type == "PROD":
          test_path = (
              AIRFLOW_SOURCES_ROOT
              / "docker_tests"
              / "test_prod_image.py"
          )
      else:
          test_path = (
              AIRFLOW_SOURCES_ROOT / "docker_tests" / "test_ci_image.py"
          )
      env = os.environ.copy()
      env["DOCKER_IMAGE"] = image_name
      if slim_image:
          env["TEST_SLIM_IMAGE"] = "true"
      command_result = run_command(
          [
              sys.executable,
              "-m",
              "pytest",
              str(test_path),
              *pytest_args,
              *extra_pytest_args,
          ],
          env=env,
          output=output,
          check=False,
      )
      return (
          command_result.returncode,
          f"Testing {image_type} python {image_name}",
      )
  
file_path: airflow/dev/breeze/src/airflow_breeze/utils/run_tests.py
imports: from __future__ import annotations
  import os
  import re
  import sys
  from itertools import chain
  from subprocess import DEVNULL
  from airflow_breeze.utils.console import Output, get_console
  from airflow_breeze.utils.packages import get_suspended_provider_folders
  from airflow_breeze.utils.path_utils import AIRFLOW_SOURCES_ROOT
  from airflow_breeze.utils.run_utils import run_command
label_desc: Use image node_id 1 for calling a global function with example usage: verify_an_image(image_name, image_type, output, slim_image, extra_pytest_args) and returns: command_result,  str, image_type, str, image_name, command_result,  str, image_type, str, image_name