code: def get_full_name_from_sc(name, spark) -> str:
      """
      Constructs the full name of a registered model using the active catalog and schema in a spark
      session / context.
      :param name: the model name provided by the user
      :param spark: the active spark session
      """
      num_levels = len(name.split("."))
      if num_levels >= 3 or spark is None:
          return name
      catalog = spark.sql(_ACTIVE_CATALOG_QUERY).collect()[0]["catalog"]
      # return the user provided name if the catalog is the hive metastore default
      if catalog in {"spark_catalog", "hive_metastore"}:
          return name
      if num_levels == 2:
          return f"{catalog}.{name}"
      schema = spark.sql(_ACTIVE_SCHEMA_QUERY).collect()[0]["schema"]
      return f"{catalog}.{schema}.{name}"
  
file_path: mlflow/mlflow/store/_unity_catalog/registry/utils.py
imports: from typing import List, Optional
  from mlflow.entities.model_registry import ModelVersion, ModelVersionTag, RegisteredModel, RegisteredModelAlias, RegisteredModelTag
  from mlflow.exceptions import MlflowException
  from mlflow.protos.databricks_uc_registry_messages_pb2 import ModelVersion
  from mlflow.protos.databricks_uc_registry_messages_pb2 import ModelVersionStatus
  from mlflow.protos.databricks_uc_registry_messages_pb2 import ModelVersionTag
  from mlflow.protos.databricks_uc_registry_messages_pb2 import RegisteredModel
  from mlflow.protos.databricks_uc_registry_messages_pb2 import RegisteredModelTag
  from mlflow.protos.databricks_uc_registry_messages_pb2 import TemporaryCredentials
  from mlflow.store.artifact.artifact_repo import ArtifactRepository
label_desc: Use image node_id 8 for calling a global function with example usage: get_full_name_from_sc(name, spark) and returns: catalog, str, schema, str, name, name, name, catalog, str, name