code: def log_model(
      gluon_model,
      artifact_path,
      conda_env=None,
      code_paths=None,
      registered_model_name=None,
      signature: ModelSignature = None,
      input_example: ModelInputExample = None,
      pip_requirements=None,
      extra_pip_requirements=None,
      metadata=None,
  ):
      """
      Log a Gluon model as an MLflow artifact for the current run.
  
      Args:
          gluon_model: Gluon model to be saved. Must be already hybridized.
          artifact_path: Run-relative artifact path.
          conda_env: {{ conda_env }}
          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.
          registered_model_name: If given, create a model version under
              ``registered_model_name``, also creating a registered model if one
              with the given name does not exist.
          signature: {{ signature }}
          input_example: {{ input_example }}
          pip_requirements: {{ pip_requirements }}
          extra_pip_requirements: {{ extra_pip_requirements }}
          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.
  
      Returns:
          A :py:class:`ModelInfo <mlflow.models.model.ModelInfo>` instance that contains the
          metadata of the logged model.
  
      .. code-block:: python
          :caption: Example
  
          from mxnet.gluon import Trainer
          from mxnet.gluon.contrib import estimator
          from mxnet.gluon.loss import SoftmaxCrossEntropyLoss
          from mxnet.gluon.nn import HybridSequential
          from mxnet.metric import Accuracy
          import mlflow
  
          # Build, compile, and train your model
          net = HybridSequential()
          with net.name_scope():
              ...
          net.hybridize()
          net.collect_params().initialize()
          softmax_loss = SoftmaxCrossEntropyLoss()
          trainer = Trainer(net.collect_params())
          est = estimator.Estimator(
              net=net, loss=softmax_loss, metrics=Accuracy(), trainer=trainer
          )
          # Log metrics and log the model
          with mlflow.start_run():
              est.fit(train_data=train_data, epochs=100, val_data=validation_data)
              mlflow.gluon.log_model(net, "model")
      """
      return Model.log(
          artifact_path=artifact_path,
          flavor=mlflow.gluon,
          gluon_model=gluon_model,
          conda_env=conda_env,
          code_paths=code_paths,
          registered_model_name=registered_model_name,
          signature=signature,
          input_example=input_example,
          pip_requirements=pip_requirements,
          extra_pip_requirements=extra_pip_requirements,
          metadata=metadata,
      )
  
imports: import os
  from typing import Any, Dict, Optional
  import numpy
  import pandas
  import yaml
  from packaging.version import Version
  import mlflow
  from mlflow import pyfunc
  from mlflow.models import Model, ModelInputExample, ModelSignature
  from mlflow.models.model import MLMODEL_FILE_NAME
  from mlflow.models.signature import _infer_signature_from_input_example
  from mlflow.models.utils import _save_example
  from mlflow.tracking.artifact_utils import _download_artifact_from_uri
  from mlflow.utils.annotations import deprecated
  from mlflow.utils.autologging_utils import autologging_integration, batch_metrics_logger, safe_patch
  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 _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_pinned_requirement
label_desc: Use image node_id 6 for calling a global function with example usage: log_model(gluon_model, artifact_path, conda_env, code_paths, registered_model_name, signature, input_example, pip_requirements, extra_pip_requirements, metadata) and returns: Model