code: def _overwrite_pip_deps(conda_env, new_pip_deps):
      """
      Overwrites the pip dependencies section in the given conda env dictionary.
  
      {
          "name": "env",
          "channels": [...],
          "dependencies": [
              ...,
              "pip",
              {"pip": [...]},  <- Overwrite this
          ],
      }
      """
      deps = conda_env.get("dependencies", [])
      new_deps = []
      contains_pip_deps = False
      for dep in deps:
          if _is_pip_deps(dep):
              contains_pip_deps = True
              new_deps.append({"pip": new_pip_deps})
          else:
              new_deps.append(dep)
  
      if not contains_pip_deps:
          new_deps.append({"pip": new_pip_deps})
  
      return {**conda_env, "dependencies": new_deps}
  
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 6 for calling a global function with example usage: _overwrite_pip_deps(conda_env, new_pip_deps) and returns: dict