code: def _merge_environments(shap_environment, model_environment):
      """
      Merge conda environments of underlying model and shap.
  
      :param shap_environment: SHAP conda environment.
      :param model_environment: Underlying model conda environment.
      """
      # merge the channels from the two environments and remove the default conda
      # channels if present since its added later in `_mlflow_conda_env`
      merged_conda_channels = _union_lists(
          shap_environment["channels"], model_environment["channels"]
      )
      merged_conda_channels = [
          x for x in merged_conda_channels if x != "conda-forge"
      ]
  
      shap_conda_deps, shap_pip_deps = _get_conda_and_pip_dependencies(
          shap_environment
      )
      (
          model_conda_deps,
          model_pip_deps,
      ) = _get_conda_and_pip_dependencies(model_environment)
  
      merged_conda_deps = _union_lists(
          shap_conda_deps, model_conda_deps
      )
      merged_pip_deps = _union_lists(shap_pip_deps, model_pip_deps)
      return _mlflow_conda_env(
          additional_conda_deps=merged_conda_deps,
          additional_pip_deps=merged_pip_deps,
          additional_conda_channels=merged_conda_channels,
      )
  
imports: import os
  import tempfile
  import types
  import warnings
  from contextlib import contextmanager
  from typing import Any, Dict, Optional
  import numpy
  import yaml
  import mlflow
  import mlflow.utils.autologging_utils
  from mlflow import pyfunc
  from mlflow.models import Model, ModelInputExample, ModelSignature
  from mlflow.models.model import MLMODEL_FILE_NAME
  from mlflow.models.utils import _save_example
  from mlflow.tracking._model_registry import DEFAULT_AWAIT_MAX_SLEEP_SECONDS
  from mlflow.tracking.artifact_utils import _download_artifact_from_uri
  from mlflow.utils.docstring_utils import LOG_MODEL_PARAM_DOCS, format_docstring
  from mlflow.utils.environment import _CONDA_ENV_FILE_NAME, _CONSTRAINTS_FILE_NAME, _PYTHON_ENV_FILE_NAME, _REQUIREMENTS_FILE_NAME, _get_pip_deps, _mlflow_conda_env, _process_conda_env, _process_pip_requirements, _PythonEnv, _validate_env_arguments
  from mlflow.utils.file_utils import write_to
  from mlflow.utils.model_utils import _add_code_from_conf_to_system_path, _get_flavor_configuration, _validate_and_copy_code_paths, _validate_and_prepare_target_save_path
  from mlflow.utils.requirements_utils import _get_package_name
  from mlflow.utils.uri import append_to_uri_path
label_desc: Use image node_id 14 for calling a global function with example usage: _merge_environments(shap_environment, model_environment) and returns: _mlflow_conda_env