code: def test_bad_http_status(self):
      mock.patch.object(
          downloader.requests.Session,
          "get",
          lambda *a, **kw: _FakeResponse(
              self.url, b"error", status_code=404
          ),
      ).start()
      promise = self.downloader.download(self.url, self.tmp_dir)
      with self.assertRaises(util.DownloadError):
          promise.get()
  
imports: import hashlib
  import io
  import os
  import tempfile
  from typing import Optional
  from unittest import mock
  import pytest
  import tensorflow
  from tensorflow_datasets import testing
  from tensorflow_datasets.core.download import downloader
  from tensorflow_datasets.core.download import resource
  from tensorflow_datasets.core.download import util
label_desc: Use image node_id 6 for calling the DownloaderTest obj's underlying member method code with example usage: obj.test_bad_http_status() without return types