code: def test_uc_models_artifact_repo_uses_active_catalog_and_schema():
      with mock.patch(
          "mlflow.store.artifact.unity_catalog_models_artifact_repo._get_active_spark_session"
      ) as spark_session_getter:
          spark = mock.MagicMock()
          spark_session_getter.return_value = spark
          sql_mock = mock.MagicMock()
          spark.sql.return_value = sql_mock
          # returns catalog and schema name in order
          sql_mock.collect.side_effect = [
              [{"catalog": "main"}],
              [{"schema": "default"}],
          ]
  
          uri_with_profile = "models:/MyModel/12"
          models_repo = UnityCatalogModelsArtifactRepository(
              uri_with_profile, _DATABRICKS_UNITY_CATALOG_SCHEME
          )
          spark.sql.assert_has_calls(
              sql_mock(_ACTIVE_CATALOG_QUERY),
              sql_mock(_ACTIVE_SCHEMA_QUERY),
          )
          assert spark.sql.call_count == 2
          assert models_repo.model_name == "main.default.MyModel"
  
imports: import json
  from unittest import mock
  from unittest.mock import ANY
  import pytest
  from google.cloud.storage import Client
  from requests import Response
  from mlflow import MlflowClient
  from mlflow.entities.file_info import FileInfo
  from mlflow.exceptions import MlflowException
  from mlflow.store._unity_catalog.registry.utils import _ACTIVE_CATALOG_QUERY, _ACTIVE_SCHEMA_QUERY
  from mlflow.store.artifact.azure_data_lake_artifact_repo import AzureDataLakeArtifactRepository
  from mlflow.store.artifact.gcs_artifact_repo import GCSArtifactRepository
  from mlflow.store.artifact.optimized_s3_artifact_repo import OptimizedS3ArtifactRepository
  from mlflow.store.artifact.unity_catalog_models_artifact_repo import UnityCatalogModelsArtifactRepository
  from mlflow.utils.uri import _DATABRICKS_UNITY_CATALOG_SCHEME
label_desc: Use image node_id 10 for calling a global function with example usage: test_uc_models_artifact_repo_uses_active_catalog_and_schema() without return types