class_docstr: Flavor backend implementation for the generic python models.
code: def copy_model_into_container_wrapper(
      self, model_uri, install_mlflow, enable_mlserver
  ):
      def copy_model_into_container(dockerfile_context_dir):
          # This function have to be included in another,
          # since `_build_image` function in `docker_utils` accepts only
          # single-argument function like this
          model_cwd = os.path.join(dockerfile_context_dir, "model_dir")
          pathlib.Path(model_cwd).mkdir(parents=True, exist_ok=True)
          if model_uri:
              model_path = _download_artifact_from_uri(
                  model_uri, output_path=model_cwd
              )
              return """
                      COPY {model_dir} /opt/ml/model
                      RUN python -c \
                      'from mlflow.models.container import _install_pyfunc_deps;\
                      _install_pyfunc_deps(\
                          "/opt/ml/model", \
                          install_mlflow={install_mlflow}, \
                          enable_mlserver={enable_mlserver}, \
                          env_manager="{env_manager}")'
                      ENV {disable_env}="true"
                      ENV {ENABLE_MLSERVER}={enable_mlserver}
                      """.format(
                  disable_env=MLFLOW_DISABLE_ENV_CREATION.name,
                  model_dir=str(
                      posixpath.join(
                          "model_dir", os.path.basename(model_path)
                      )
                  ),
                  install_mlflow=repr(install_mlflow),
                  ENABLE_MLSERVER=ENABLE_MLSERVER,
                  enable_mlserver=repr(enable_mlserver),
                  env_manager=self._env_manager,
              )
          else:
              return f"""
                      ENV {MLFLOW_DISABLE_ENV_CREATION}="true"
                      ENV {ENABLE_MLSERVER}={enable_mlserver!r}
                      """
  
      return copy_model_into_container
  
imports: import ctypes
  import logging
  import os
  import pathlib
  import posixpath
  import shlex
  import signal
  import subprocess
  import sys
  import warnings
  from pathlib import Path
  from mlflow.environment_variables import MLFLOW_DISABLE_ENV_CREATION
  from mlflow.exceptions import MlflowException
  from mlflow.models import FlavorBackend
  from mlflow.models.container import ENABLE_MLSERVER
  from mlflow.models.docker_utils import SETUP_MINICONDA, SETUP_PYENV_AND_VIRTUALENV, _build_image, _generate_dockerfile_content, _get_mlflow_install_step
  from mlflow.pyfunc import ENV, _extract_conda_env, _mlflow_pyfunc_backend_predict, mlserver, scoring_server
  from mlflow.tracking.artifact_utils import _download_artifact_from_uri
  from mlflow.utils import env_manager
  from mlflow.utils.conda import get_conda_bin_executable, get_or_create_conda_env
  from mlflow.utils.environment import Environment
  from mlflow.utils.file_utils import get_or_create_nfs_tmp_dir, get_or_create_tmp_dir, path_to_local_file_uri
  from mlflow.utils.nfs_on_spark import get_nfs_cache_root_dir
  from mlflow.utils.process import ShellCommandException, cache_return_value_per_process
  from mlflow.utils.virtualenv import _get_or_create_virtualenv, _get_pip_install_mlflow
  from mlflow.version import VERSION
label_desc: Use image node_id 9 for calling the PyFuncBackend obj's underlying member method code with example usage: obj.copy_model_into_container_wrapper(model_uri, install_mlflow, enable_mlserver) and returns: copy_model_into_container, str, str, MLFLOW_DISABLE_ENV_CREATION, str, ENABLE_MLSERVER, str, enable_mlserver, str