code: def subclass_test(
      adapter_cls,
      valid_models,
      invalid_models,
  ):
      # Verify valid models can be adapted
      for model in valid_models:
          assert adapter_cls._validate_obj(model)
  
      # Verify invalid models are denied
      for model in invalid_models:
          assert not adapter_cls._validate_obj(model)
  
      # Verify file-level serialization and deserialization
      for model in valid_models:
          path = adapter_cls._tmp_path()
          adapter_cls._serialize(model, path)
          model2 = adapter_cls._deserialize(path)
          assert model2 is not None
  
imports: import os
  import platform
  import pytest
  import wandb
  from wandb.sdk.artifacts.artifact import Artifact
  from wandb.sdk.artifacts.artifact_manifest_entry import ArtifactManifestEntry
  from wandb.sdk.data_types import saved_model
  from wandb.sdk.lib.filesystem import copy_or_overwrite_changed
  from .None import saved_model_constructors
label_desc: Use image node_id 9 for calling a global function with example usage: subclass_test(adapter_cls, valid_models, invalid_models) without return types