code: def test_read_mlflow_creds_env_takes_precedence_over_file(
      tmp_path, monkeypatch
  ):
      monkeypatch.setenv(MLFLOW_TRACKING_USERNAME.name, "username_env")
      monkeypatch.setenv(MLFLOW_TRACKING_PASSWORD.name, "password_env")
      creds_file = tmp_path.joinpath("credentials")
      with mock.patch(
          "mlflow.utils.credentials._get_credentials_path",
          return_value=str(creds_file),
      ):
          creds_file.write_text(
              """
  [mlflow]
  mlflow_tracking_username = username_file
  mlflow_tracking_password = password_file
  """
          )
          creds = read_mlflow_creds()
          assert creds.username == "username_env"
          assert creds.password == "password_env"
  
file_path: mlflow/tests/utils/test_credentials.py
imports: from unittest import mock
  from unittest.mock import patch
  import pytest
  from mlflow import get_tracking_uri
  from mlflow.environment_variables import MLFLOW_TRACKING_PASSWORD, MLFLOW_TRACKING_USERNAME
  from mlflow.exceptions import MlflowException
  from mlflow.utils.credentials import login, read_mlflow_creds
label_desc: Use image node_id 3 for calling a global function with example usage: test_read_mlflow_creds_env_takes_precedence_over_file(tmp_path, monkeypatch) without return types