code: def log_model(
      ludwig_model,
      artifact_path,
      conda_env=None,
      registered_model_name=None,
      signature: ModelSignature = None,
      input_example: ModelInputExample = None,
      await_registration_for=DEFAULT_AWAIT_MAX_SLEEP_SECONDS,
  ):
      """Log a Ludwig model as an MLflow artifact for the current run.
  
      :param ludwig_model: Ludwig model (an instance of `ludwig.api.LudwigModel`_) to be saved.
      :param artifact_path: Run-relative artifact path.
      :param conda_env: Either a dictionary representation of a Conda environment or the path to a
                        Conda environment yaml file. If provided, this describes the environment
                        this model should be run in. At minimum, it should specify the dependencies
                        contained in :func:`get_default_conda_env()`. If ``None``, the default
                        :func:`get_default_conda_env()` environment is added to the model.
                        The following is an *example* dictionary representation of a Conda
                        environment::
  
                          {
                              'name': 'mlflow-env',
                              'channels': ['defaults'],
                              'dependencies': [
                                  'python=3.7.0',
                                  'pip': [
                                      'ludwig==0.4.0'
                                  ]
                              ]
                          }
      :param registered_model_name: (Experimental) 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: (Experimental) :py:class:`ModelSignature <mlflow.models.ModelSignature>`
                        describes model input and output :py:class:`Schema <mlflow.types.Schema>`.
                        The model signature can be :py:func:`inferred <mlflow.models.infer_signature>`
                        from datasets with valid model input (e.g. the training dataset with target
                        column omitted) and valid model output (e.g. model predictions generated on
                        the training dataset), for example:
  
                        .. code-block:: python
  
                          from mlflow.models.signature import infer_signature
  
                          train = df.drop_column("target_label")
                          predictions = ...  # compute model predictions
                          signature = infer_signature(train, predictions)
      :param input_example: (Experimental) Input example provides one or several instances of valid
                            model input. The example can be used as a hint of what data to feed the
                            model. The given example will be converted to a Pandas DataFrame and then
                            serialized to json using the Pandas split-oriented format. Bytes are
                            base64-encoded.
      :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.
      """
      import ludwig
  
      Model.log(
          artifact_path=artifact_path,
          flavor=ludwig.contribs.mlflow.model,
          registered_model_name=registered_model_name,
          conda_env=conda_env,
          signature=signature,
          input_example=input_example,
          await_registration_for=await_registration_for,
          ludwig_model=ludwig_model,
      )
  
imports: import logging
  import os
  import shutil
  import mlflow
  import yaml
  from mlflow import pyfunc
  from mlflow.exceptions import MlflowException
  from mlflow.models import Model
  from mlflow.models.model import MLMODEL_FILE_NAME
  from mlflow.models.signature import ModelSignature
  from mlflow.models.utils import _save_example, ModelInputExample
  from mlflow.tracking._model_registry import DEFAULT_AWAIT_MAX_SLEEP_SECONDS
  from mlflow.tracking.artifact_utils import _download_artifact_from_uri
  from mlflow.utils.environment import _mlflow_conda_env
  from mlflow.utils.model_utils import _get_flavor_configuration
  from ludwig.api_annotations import DeveloperAPI
  from ludwig.globals import MODEL_HYPERPARAMETERS_FILE_NAME
  from ludwig.utils.data_utils import load_json
label_desc: Use image node_id 3 for calling a global function with example usage: log_model(ludwig_model, artifact_path, conda_env, registered_model_name, signature, input_example, await_registration_for) without return types