def METHOD_NAME(monkeypatch):
    error_response = requests.Response()
    error_response.status_code = 404
    error_response.close = lambda: 0  # Mock close method to avoid unrelated exception
    monkeypatch.setattr(requests, "get", lambda *args, **kwargs: error_response)
    with pytest.raises(requests.RequestException):
        utils.download_tmp_copy_of_file("https://example.com/foo")