code: def register_model(
      model_uri,
      name,
      await_registration_for=DEFAULT_AWAIT_MAX_SLEEP_SECONDS,
      *,
      tags: Optional[Dict[str, Any]] = None,
  ) -> ModelVersion:
      """
      Create a new model version in model registry for the model files specified by ``model_uri``.
      Note that this method assumes the model registry backend URI is the same as that of the
      tracking backend.
  
      :param model_uri: URI referring to the MLmodel directory. Use a ``runs:/`` URI if you want to
                        record the run ID with the model in model registry (recommended), or pass the
                        local filesystem path of the model if registering a locally-persisted MLflow
                        model that was previously saved using ``save_model``.
                        ``models:/`` URIs are currently not supported.
      :param name: Name of the registered model under which to create a new model version. If a
                   registered model with the given name does not exist, it will be created
                   automatically.
      :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 tags: A dictionary of key-value pairs that are converted into
                   :py:class:`mlflow.entities.model_registry.ModelVersionTag` objects.
      :return: Single :py:class:`mlflow.entities.model_registry.ModelVersion` object created by
               backend.
  
      .. testcode:: python
          :caption: Example
  
          import mlflow.sklearn
          from mlflow.models import infer_signature
          from sklearn.datasets import make_regression
          from sklearn.ensemble import RandomForestRegressor
  
          mlflow.set_tracking_uri("sqlite:////tmp/mlruns.db")
          params = {"n_estimators": 3, "random_state": 42}
          X, y = make_regression(n_features=4, n_informative=2, random_state=0, shuffle=False)
  
          # Log MLflow entities
          with mlflow.start_run() as run:
              rfr = RandomForestRegressor(**params).fit(X, y)
              signature = infer_signature(X, rfr.predict(X))
              mlflow.log_params(params)
              mlflow.sklearn.log_model(rfr, artifact_path="sklearn-model", signature=signature)
  
          model_uri = f"runs:/{run.info.run_id}/sklearn-model"
          mv = mlflow.register_model(model_uri, "RandomForestRegressionModel")
          print(f"Name: {mv.name}")
          print(f"Version: {mv.version}")
  
      .. code-block:: text
          :caption: Output
  
          Name: RandomForestRegressionModel
          Version: 1
      """
      return _register_model(
          model_uri=model_uri,
          name=name,
          await_registration_for=await_registration_for,
          tags=tags,
      )
  
file_path: mlflow/mlflow/tracking/_model_registry/fluent.py
imports: from typing import Any, Dict, List, Optional
  from mlflow.entities.model_registry import ModelVersion, RegisteredModel
  from mlflow.exceptions import MlflowException
  from mlflow.protos.databricks_pb2 import ALREADY_EXISTS, RESOURCE_ALREADY_EXISTS, ErrorCode
  from mlflow.store.artifact.runs_artifact_repo import RunsArtifactRepository
  from mlflow.store.model_registry import SEARCH_MODEL_VERSION_MAX_RESULTS_DEFAULT, SEARCH_REGISTERED_MODEL_MAX_RESULTS_DEFAULT
  from mlflow.tracking._model_registry import DEFAULT_AWAIT_MAX_SLEEP_SECONDS
  from mlflow.tracking.client import MlflowClient
  from mlflow.utils import get_results_from_paginated_fn
  from mlflow.utils.logging_utils import eprint
label_desc: Use image node_id 1 for calling a global function with example usage: register_model(model_uri, name, await_registration_for) and returns: _register_model