code: def _setup_and_test_aliases(store, model_name):
      store.create_registered_model(model_name)
      run_id_1 = uuid.uuid4().hex
      run_id_2 = uuid.uuid4().hex
      store.create_model_version(model_name, "v1", run_id_1)
      store.create_model_version(model_name, "v2", run_id_2)
      store.set_registered_model_alias(model_name, "test_alias", "2")
      model = store.get_registered_model(model_name)
      assert model.aliases == {"test_alias": "2"}
      mv1 = store.get_model_version(model_name, 1)
      mv2 = store.get_model_version(model_name, 2)
      assert mv1.aliases == []
      assert mv2.aliases == ["test_alias"]
  
imports: import time
  import uuid
  from typing import List, NamedTuple
  from unittest import mock
  import pytest
  from mlflow.entities.model_registry import ModelVersion, ModelVersionTag, RegisteredModelTag
  from mlflow.exceptions import MlflowException
  from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE, RESOURCE_DOES_NOT_EXIST, ErrorCode
  from mlflow.store.model_registry.file_store import FileStore
  from mlflow.utils.file_utils import path_to_local_file_uri, write_yaml
  from mlflow.utils.time import get_current_time_millis
  from tests.helper_functions import random_int, random_str
label_desc: Use image node_id 39 for calling a global function with example usage: _setup_and_test_aliases(store, model_name) without return types