code: def test_file_downloaded_in_cache(self):
      with SoftTemporaryDirectory() as cache:
          snapshot_download(MODEL_IDENTIFIER, cache_dir=cache)
  
          expected_directory_name = (
              f'models--{MODEL_IDENTIFIER.replace("/", "--")}'
          )
          expected_path = os.path.join(cache, expected_directory_name)
  
          refs = os.listdir(os.path.join(expected_path, "refs"))
  
          snapshots = os.listdir(
              os.path.join(expected_path, "snapshots")
          )
          snapshots.sort()
  
          # Directory should contain two revisions
          self.assertListEqual(refs, ["main"])
  
          ref_content = get_file_contents(
              os.path.join(expected_path, "refs", refs[0])
          )
  
          # snapshots directory should contain two snapshots
          self.assertListEqual([ref_content], snapshots)
  
          snapshot_path = os.path.join(
              expected_path, "snapshots", snapshots[0]
          )
  
          files_in_snapshot = os.listdir(snapshot_path)
  
          snapshot_links = [
              os.readlink(os.path.join(snapshot_path, filename))
              for filename in files_in_snapshot
          ]
  
          resolved_snapshot_links = [
              os.path.normpath(os.path.join(snapshot_path, link))
              for link in snapshot_links
          ]
  
          self.assertTrue(
              all(
                  [
                      os.path.isfile(link)
                      for link in resolved_snapshot_links
                  ]
              )
          )
  
imports: import os
  import time
  import unittest
  from io import BytesIO
  from huggingface_hub import HfApi, hf_hub_download, snapshot_download
  from huggingface_hub.utils import SoftTemporaryDirectory, logging
  from huggingface_hub.utils._errors import EntryNotFoundError
  from .testing_constants import ENDPOINT_STAGING, TOKEN
  from .testing_utils import repo_name, with_production_testing, xfail_on_windows
label_desc: Use image node_id 1 for calling the CacheFileLayoutSnapshotDownload obj's underlying member method code with example usage: obj.test_file_downloaded_in_cache() without return types