code: def api_request(
      method: str,
      path: str,
      base_url: str = "http://localhost:8080/api/v1",
      **kwargs,
  ) -> dict:
      response = requests.request(
          method=method,
          url=f"{base_url}/{path}",
          auth=(AIRFLOW_WWW_USER_USERNAME, AIRFLOW_WWW_USER_PASSWORD),
          headers={"Content-Type": "application/json"},
          **kwargs,
      )
      response.raise_for_status()
      return response.json()
  
file_path: airflow/docker_tests/test_docker_compose_quick_start.py
imports: from __future__ import annotations
  import json
  import os
  import shlex
  import subprocess
  import sys
  from pprint import pprint
  from shutil import copyfile
  from time import monotonic, sleep
  import requests
  from docker_tests.command_utils import run_command
  from docker_tests.constants import SOURCE_ROOT
  from docker_tests.docker_tests_utils import docker_image
label_desc: Use image node_id 1 for calling a global function with example usage: api_request(method, path, base_url) and returns: response