code: def log_model(
      model,
      artifact_path,
      conda_env=None,
      code_paths=None,
      registered_model_name=None,
      signature=None,
      input_example=None,
      await_registration_for=DEFAULT_AWAIT_MAX_SLEEP_SECONDS,
      pip_requirements=None,
      extra_pip_requirements=None,
      metadata=None,
      model_config: Optional[Dict[str, Any]] = None,
  ):
      """
      Log a Promptflow model as an MLflow artifact for the current run.
  
      :param model: A promptflow model loaded by `promptflow.load_flow()`.
      :param artifact_path: Run-relative artifact path.
      :param conda_env: {{ conda_env }}
      :param code_paths: A list of local filesystem paths to Python file dependencies (or directories
                         containing file dependencies). These files are *prepended* to the system
                         path when the model is loaded.
  
      :param registered_model_name: This argument may change or be removed in a
                                    future release without warning. If given, create a model
                                    version under ``registered_model_name``, also creating a
                                    registered model if one with the given name does not exist.
      :param signature: :py:class:`ModelSignature <mlflow.models.ModelSignature>`
                        describes model input and output
                        :py:class:`Schema <mlflow.types.Schema>`.
  
      :param input_example: {{ input_example }}
  
      :param await_registration_for: Number of seconds to wait for the model version
                          to finish being created and is in ``READY`` status.
                          By default, the function waits for five minutes.
                          Specify 0 or None to skip waiting.
      :param pip_requirements: {{ pip_requirements }}
      :param extra_pip_requirements: {{ extra_pip_requirements }}
      :param metadata: Custom metadata dictionary passed to the model and stored in the MLmodel file.
  
                       .. Note:: Experimental: This parameter may change or be removed in a future
                                               release without warning.
      :param model_config:
          A dict of valid overrides that can be applied to a flow instance during inference.
          These arguments are used exclusively for the case of loading the model as a ``pyfunc``
          Model.
          These values are not applied to a returned flow from a call to
          ``mlflow.promptflow.load_model()``.
          To override configs for a loaded flow with promptflow flavor,
          please update the ``pf_model.context`` directly.
  
  
          Configs that can be overridden includes:
          ``connection.provider`` - The connection provider to use for the flow. Reach
          https://microsoft.github.io/promptflow/how-to-guides/set-global-configs.html#connection-provider
          for more details on how to set connection provider.
  
  
          An example of providing overrides for a model to use azure machine
          learning workspace connection:
  
          .. code-block:: python
  
              flow_folder = Path(__file__).parent / "basic"
              flow = load_flow(flow_folder)
  
              workspace_resource_id = (
                  "azureml://subscriptions/{your-subscription}/resourceGroups/{your-resourcegroup}"
                  "/providers/Microsoft.MachineLearningServices/workspaces/{your-workspace}"
              )
              model_config = {"connection.provider": workspace_resource_id}
  
              with mlflow.start_run():
                  logged_model = mlflow.promptflow.log_model(
                      flow, artifact_path="promptflow_model", model_config=model_config
                  )
      :return: A :py:class:`ModelInfo <mlflow.models.model.ModelInfo>` instance that contains the
               metadata of the logged model.
      """
  
      return Model.log(
          artifact_path=artifact_path,
          flavor=mlflow.promptflow,
          registered_model_name=registered_model_name,
          model=model,
          conda_env=conda_env,
          code_paths=code_paths,
          signature=signature,
          input_example=input_example,
          await_registration_for=await_registration_for,
          pip_requirements=pip_requirements,
          extra_pip_requirements=extra_pip_requirements,
          metadata=metadata,
          model_config=model_config,
      )
  
imports: import logging
  import os
  import shutil
  from pathlib import Path
  from typing import Any, Dict, List, Optional, Union
  import pandas
  import yaml
  import mlflow
  from mlflow import pyfunc
  from mlflow.models import Model, ModelSignature
  from mlflow.models.model import MLMODEL_FILE_NAME
  from mlflow.models.signature import _infer_signature_from_input_example
  from mlflow.models.utils import ModelInputExample, _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.annotations import experimental
  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, _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 _validate_and_copy_code_paths, _validate_and_prepare_target_save_path
  from mlflow.utils.requirements_utils import _get_pinned_requirement
label_desc: Use image node_id 3 for calling a global function with example usage: log_model(model, artifact_path, conda_env, code_paths, registered_model_name, signature, input_example, await_registration_for, pip_requirements, extra_pip_requirements, metadata, model_config) and returns: Model