code: def test_cached_files_are_used_when_no_internet(self):
      # A mock response for an HTTP head request to emulate server down
      response_mock = mock.Mock()
      response_mock.status_code = 500
      response_mock.headers = {}
      response_mock.raise_for_status.side_effect = HTTPError
      response_mock.json.return_value = {}
  
      # Download this model to make sure it's in the cache.
      orig_model = UNet2DConditionModel.from_pretrained(
          "hf-internal-testing/tiny-stable-diffusion-torch",
          subfolder="unet",
      )
  
      # Under the mock environment we get a 500 error when trying to reach the model.
      with mock.patch("requests.request", return_value=response_mock):
          # Download this model to make sure it's in the cache.
          model = UNet2DConditionModel.from_pretrained(
              "hf-internal-testing/tiny-stable-diffusion-torch",
              subfolder="unet",
              local_files_only=True,
          )
  
      for p1, p2 in zip(orig_model.parameters(), model.parameters()):
          if p1.data.ne(p2.data).sum() > 0:
              assert False, "Parameters not the same!"
  
imports: import inspect
  import tempfile
  import traceback
  import unittest
  import unittest.mock
  import uuid
  from typing import Dict, List, Tuple
  import numpy
  import requests_mock
  import torch
  from huggingface_hub import delete_repo
  from requests.exceptions import HTTPError
  from diffusers.models import UNet2DConditionModel
  from diffusers.models.attention_processor import AttnProcessor, AttnProcessor2_0, XFormersAttnProcessor
  from diffusers.training_utils import EMAModel
  from diffusers.utils import is_xformers_available, logging
  from diffusers.utils.testing_utils import CaptureLogger, require_python39_or_higher, require_torch_2, require_torch_gpu, run_test_in_subprocess, torch_device
  from ..others.test_utils import TOKEN, USER, is_staging_test
label_desc: Use image node_id 3 for calling the ModelUtilsTest obj's underlying member method code with example usage: obj.test_cached_files_are_used_when_no_internet() without return types