code: def test_loading_mmar(self, item):
      if (
          item["name"]
          == "clara_pt_self_supervised_learning_segmentation"
      ):  # test the byow model
          default_model_file = os.path.join(
              "ssl_models_2gpu", "best_metric_model.pt"
          )
          pretrained_weights = load_from_mmar(
              item=item["name"],
              mmar_dir="./",
              map_location="cpu",
              api=True,
              model_file=default_model_file,
              weights_only=True,
          )
          pretrained_weights = {
              k.split(".", 1)[1]: v
              for k, v in pretrained_weights["state_dict"].items()
          }
          sys.path.append(
              os.path.join(f"{item['name']}", "custom")
          )  # custom model folder
          from vit_network import ViTAutoEnc  # pylint: disable=E0401
  
          model = ViTAutoEnc(
              in_channels=1,
              img_size=(96, 96, 96),
              patch_size=(16, 16, 16),
              pos_embed="conv",
              hidden_size=768,
              mlp_dim=3072,
          )
          _, loaded, not_loaded = copy_model_state(
              model, pretrained_weights
          )
          self.assertTrue(len(loaded) > 0 and len(not_loaded) == 0)
          return
      if (
          item["name"]
          == "clara_pt_fed_learning_brain_tumor_mri_segmentation"
      ):
          default_model_file = os.path.join(
              "models", "server", "best_FL_global_model.pt"
          )
      else:
          default_model_file = None
      pretrained_model = load_from_mmar(
          item=item["name"],
          mmar_dir="./",
          map_location="cpu",
          api=True,
          model_file=default_model_file,
      )
      self.assertTrue(isinstance(pretrained_model, torch.nn.Module))
  
imports: from __future__ import annotations
  import os
  import sys
  import tempfile
  import unittest
  import torch
  from parameterized import parameterized
  from monai.apps import check_hash
  from monai.apps.mmars import MODEL_DESC, load_from_mmar
  from monai.bundle import download, load
  from monai.config import print_debug_info
  from monai.networks.utils import copy_model_state
  from tests.utils import assert_allclose, skip_if_downloading_fails, skip_if_quick, skip_if_windows
label_desc: Use image node_id 2 for calling the TestAllDownloadingMMAR obj's underlying member method code with example usage: obj.test_loading_mmar(item) without return types