class_docstr: MLflow entity for Model Version.
class_docstr_tok: ["MLflow","entity","for","Model","Version","."]
code: def to_proto(self):
      # input: ModelVersion entity
      # returns mlflow.protos.model_registry_pb2.ModelVersion
      model_version = ProtoModelVersion()
      model_version.name = self.name
      model_version.version = str(self.version)
      model_version.creation_timestamp = self.creation_timestamp
      if self.last_updated_timestamp is not None:
          model_version.last_updated_timestamp = (
              self.last_updated_timestamp
          )
      if self.description is not None:
          model_version.description = self.description
      if self.user_id is not None:
          model_version.user_id = self.user_id
      if self.current_stage is not None:
          model_version.current_stage = self.current_stage
      if self.source is not None:
          model_version.source = str(self.source)
      if self.run_id is not None:
          model_version.run_id = str(self.run_id)
      if self.run_link is not None:
          model_version.run_link = str(self.run_link)
      if self.status is not None:
          model_version.status = ModelVersionStatus.from_string(
              self.status
          )
      if self.status_message:
          model_version.status_message = self.status_message
      model_version.tags.extend(
          [
              ProtoModelVersionTag(key=key, value=value)
              for key, value in self._tags.items()
          ]
      )
      model_version.aliases.extend(self.aliases)
      return model_version
  
imports: from mlflow.entities.model_registry._model_registry_entity import _ModelRegistryEntity
  from mlflow.entities.model_registry.model_version_status import ModelVersionStatus
  from mlflow.entities.model_registry.model_version_tag import ModelVersionTag
  from mlflow.protos.model_registry_pb2 import ModelVersion
  from mlflow.protos.model_registry_pb2 import ModelVersionTag
label_desc: Use image node_id 24 for calling the ModelVersion obj's underlying member method code with example usage: obj.to_proto() and returns: model_version