code: def test_models(client: _client.Determined) -> None:
      suffix = [
          random.sample("abcdefghijklmnopqrstuvwxyz", 1)
          for _ in range(10)
      ]
      model_name = f"test-model-{suffix}"
      model = client.create_model(model_name)
      try:
          assert model_name in (m.name for m in client.get_models())
  
          model.archive()
          model.unarchive()
  
          labels = ["test-model-label-0", "test-model-label-1"]
          model.set_labels(labels)
          model.add_metadata({"a": 1, "b": 2, "c": 3})
          model.set_description("modeldescr")
  
          # Check cached values
          assert set(client.get_model_labels()) == set(labels)
          assert model.metadata == {
              "a": 1,
              "b": 2,
              "c": 3,
          }, model.metadata
          assert model.description == "modeldescr", model.description
  
          # avoid false-positives due to caching on the model object itself
          model = client.get_model(model_name)
          assert model.labels
          assert set(model.labels) == set(labels)
          assert model.metadata == {
              "a": 1,
              "b": 2,
              "c": 3,
          }, model.metadata
          assert model.description == "modeldescr", model.description
  
          model.set_labels([])
          model.remove_metadata(["a", "b"])
  
          # break the cache again, testing get_model_by_id.
          assert (
              model.model_id is not None
          ), "model_id was populated by create_model"
          model = client.get_model_by_id(model.model_id)
          assert model.labels == []
          assert model.metadata == {"c": 3}, model.metadata
  
      finally:
          model.delete()
  
      with pytest.raises(errors.APIException):
          client.get_model(model_name)
  
file_path: determined/e2e_tests/tests/test_sdk.py
imports: import os
  import random
  import shutil
  import tempfile
  import time
  import pytest
  from determined.common import util
  from determined.common.api import bindings, errors
  from determined.common.experimental import resource_pool
  from determined.common.experimental.metrics import TrialMetrics
  from determined.experimental import client
  from tests import config
label_desc: Use image node_id 5 for calling a global function with example usage: test_models(client) without return types