code: def docker_example_base_image():
      import docker
      from docker.errors import APIError, BuildError
  
      mlflow_home = os.environ.get("MLFLOW_HOME", None)
      if not mlflow_home:
          raise Exception(
              "MLFLOW_HOME environment variable is not set. Please set the variable to "
              "point to your mlflow dev root."
          )
      with TempDir() as tmp:
          cwd = tmp.path()
          mlflow_dir = _copy_project(src_path=mlflow_home, dst_path=cwd)
          shutil.copy(
              os.path.join(TEST_DOCKER_PROJECT_DIR, "Dockerfile"),
              tmp.path("Dockerfile"),
          )
          with open(tmp.path("Dockerfile"), "a") as f:
              f.write(
                  f"COPY {mlflow_dir} /opt/mlflow\nRUN pip install -U -e /opt/mlflow\n"
              )
  
          client = docker.from_env()
          try:
              client.images.build(
                  tag="mlflow-docker-example",
                  forcerm=True,
                  nocache=True,
                  dockerfile="Dockerfile",
                  path=cwd,
              )
          except BuildError as build_error:
              for chunk in build_error.build_log:
                  _logger.info(chunk)
              raise build_error
          except APIError as api_error:
              raise api_error
  
file_path: mlflow/tests/projects/utils.py
imports: import filecmp
  import logging
  import os
  import shutil
  import pytest
  from mlflow.entities import RunStatus
  from mlflow.projects import _project_spec
  from mlflow.utils.file_utils import TempDir, _copy_project
label_desc: Use image node_id 4 for calling a global function with example usage: docker_example_base_image() without return types