code: def use_dev_mlflow_for_projects():
      mlflow_root = os.path.dirname(os.path.dirname(mlflow.__file__))
  
      conda_env = read_yaml(
          TEST_VIRTUALENV_CONDA_PROJECT_DIR, "conda.yaml"
      )
      conda_pip_dependencies = [
          item
          for item in conda_env["dependencies"]
          if isinstance(item, dict) and "pip" in item
      ][0]["pip"]
      if "mlflow" in conda_pip_dependencies:
          conda_pip_dependencies.remove("mlflow")
          conda_pip_dependencies.append(mlflow_root)
      write_yaml(
          TEST_VIRTUALENV_CONDA_PROJECT_DIR,
          "conda.yaml",
          conda_env,
          overwrite=True,
      )
  
      for proj_dir in (
          TEST_VIRTUALENV_PROJECT_DIR,
          TEST_VIRTUALENV_NO_PYTHON_ENV,
      ):
          virtualenv_requirements_path = os.path.join(
              proj_dir, "requirements.txt"
          )
          with open(virtualenv_requirements_path) as f:
              virtualenv_requirements = f.readlines()
  
          with open(virtualenv_requirements_path, "w") as f:
              for line in virtualenv_requirements:
                  if line.rstrip("\n") != "mlflow":
                      f.write(line)
                  else:
                      f.write(mlflow_root)
                      f.write("\n")
  
file_path: mlflow/tests/projects/test_virtualenv_projects.py
imports: import os
  from unittest import mock
  import pytest
  import mlflow
  from mlflow.exceptions import MlflowException
  from mlflow.utils.file_utils import read_yaml, write_yaml
  from mlflow.utils.virtualenv import _create_virtualenv
  from tests.projects.utils import TEST_VIRTUALENV_CONDA_PROJECT_DIR, TEST_VIRTUALENV_NO_PYTHON_ENV, TEST_VIRTUALENV_PROJECT_DIR
label_desc: Use image node_id 1 for calling a global function with example usage: use_dev_mlflow_for_projects() without return types