code: def test_from_pretrained_no_load_weights(self):
      _ = cached_transformers.get(
          "epwalsh/bert-xsmall-dummy",
          False,
          load_weights=False,
          cache_dir=self.TEST_DIR,
      )
      # check that only three files were downloaded (filename.json, filename, filename.lock), for config.json
      # if more than three files were downloaded, then model weights were also (incorrectly) downloaded
      # NOTE: downloaded files are not explicitly detailed in Huggingface's public API,
      # so this assertion could fail in the future
      json_fnames = [
          fname
          for fname in os.listdir(str(self.TEST_DIR))
          if fname.endswith(".json")
      ]
      assert len(json_fnames) == 1
      json_data = json.load(open(str(self.TEST_DIR / json_fnames[0])))
      assert (
          json_data["url"]
          == "https://huggingface.co/epwalsh/bert-xsmall-dummy/resolve/main/config.json"
      )
      resource_id = os.path.splitext(json_fnames[0])[0]
      assert set(os.listdir(str(self.TEST_DIR))) == set(
          [json_fnames[0], resource_id, resource_id + ".lock"]
      )
  
imports: import json
  import os
  import pytest
  import torch
  from allennlp.common import cached_transformers
  from allennlp.common.checks import ConfigurationError
  from allennlp.common.testing import AllenNlpTestCase
  from transformers import AutoConfig, AutoModel
label_desc: Use image node_id 9 for calling the TestCachedTransformers obj's underlying member method code with example usage: obj.test_from_pretrained_no_load_weights() without return types