code: def test_constructor_argument_validation():
      with pytest.raises(TypeError, match="`python` must be a string"):
          _PythonEnv(python=1)
  
      with pytest.raises(
          TypeError, match="`build_dependencies` must be a list"
      ):
          _PythonEnv(build_dependencies=0)
  
      with pytest.raises(
          TypeError, match="`dependencies` must be a list"
      ):
          _PythonEnv(dependencies=0)
  
file_path: mlflow/tests/utils/test_python_env.py
imports: from unittest import mock
  import pytest
  from mlflow.utils import PYTHON_VERSION
  from mlflow.utils.environment import _PythonEnv
label_desc: Use image node_id 1 for calling a global function with example usage: test_constructor_argument_validation() without return types