code: def test_download_tmp_copy_of_file_does_not_save_errors(
      monkeypatch, gradio_temp_dir
  ):
      error_response = httpx.Response(status_code=404)
      monkeypatch.setattr(
          httpx, "get", lambda *args, **kwargs: error_response
      )
      with pytest.raises(httpx.HTTPStatusError):
          utils.download_file(
              "https://example.com/foo", dir=str(gradio_temp_dir)
          )
  
imports: import importlib.resources
  import json
  import os
  import tempfile
  from copy import deepcopy
  from pathlib import Path
  from unittest.mock import MagicMock, patch
  import httpx
  import pytest
  from huggingface_hub import HfFolder
  from gradio_client import media_data, utils
label_desc: Use image node_id 8 for calling a global function with example usage: test_download_tmp_copy_of_file_does_not_save_errors(monkeypatch, gradio_temp_dir) without return types