code: def test_read_mlflow_creds_env(username, password, monkeypatch):
      if username is None:
          monkeypatch.delenv(
              MLFLOW_TRACKING_USERNAME.name, raising=False
          )
      else:
          monkeypatch.setenv(MLFLOW_TRACKING_USERNAME.name, username)
  
      if password is None:
          monkeypatch.delenv(
              MLFLOW_TRACKING_PASSWORD.name, raising=False
          )
      else:
          monkeypatch.setenv(MLFLOW_TRACKING_PASSWORD.name, password)
  
      creds = read_mlflow_creds()
      assert creds.username == username
      assert creds.password == password
  
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 2 for calling a global function with example usage: test_read_mlflow_creds_env(username, password, monkeypatch) without return types