docstr: Represents environment information for MLflow Models and Projects.
  
  Args:
      python: Python version for the environment. If unspecified, defaults to the current
          Python version.
      build_dependencies: List of build dependencies for the environment that must
          be installed before installing ``dependencies``. If unspecified,
          defaults to an empty list.
      dependencies: List of dependencies for the environment. If unspecified, defaults to
          an empty list.
docstr_tok: ["Represents","environment","information","for","MLflow","Models","and","Projects",".","Args",":","python",":","Python","version","for","the","environment",".","If","unspecified",",","defaults","to","the","current","Python","version",".","build_dependencies",":","List","of","build","dependencies","for","the","environment","that","must","be","installed","before","installing","``","dependencies","``",".","If","unspecified",",","defaults","to","an","empty","list",".","dependencies",":","List","of","dependencies","for","the","environment",".","If","unspecified",",","defaults","to","an","empty","list","."]
code: def __init__(
      self, python=None, build_dependencies=None, dependencies=None
  ):
      """
      Represents environment information for MLflow Models and Projects.
  
      Args:
          python: Python version for the environment. If unspecified, defaults to the current
              Python version.
          build_dependencies: List of build dependencies for the environment that must
              be installed before installing ``dependencies``. If unspecified,
              defaults to an empty list.
          dependencies: List of dependencies for the environment. If unspecified, defaults to
              an empty list.
      """
      if python is not None and not isinstance(python, str):
          raise TypeError(
              f"`python` must be a string but got {type(python)}"
          )
      if build_dependencies is not None and not isinstance(
          build_dependencies, list
      ):
          raise TypeError(
              f"`build_dependencies` must be a list but got {type(build_dependencies)}"
          )
      if dependencies is not None and not isinstance(
          dependencies, list
      ):
          raise TypeError(
              f"`dependencies` must be a list but got {type(dependencies)}"
          )
  
      self.python = python or PYTHON_VERSION
      self.build_dependencies = build_dependencies or []
      self.dependencies = dependencies or []
  
imports: import logging
  import os
  import re
  import subprocess
  import sys
  import tempfile
  import yaml
  from packaging.requirements import InvalidRequirement, Requirement
  from packaging.version import Version
  from mlflow.environment_variables import _MLFLOW_TESTING
  from mlflow.exceptions import MlflowException
  from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE
  from mlflow.utils import PYTHON_VERSION, insecure_hash
  from mlflow.utils.process import _exec_cmd
  from mlflow.utils.requirements_utils import _infer_requirements, _parse_requirements
  from mlflow.version import VERSION
label_desc: Use image node_id 1 to create a new _PythonEnv object  with example: obj = _PythonEnv(python, build_dependencies, dependencies)