code: def setUp(self):
      super(DownloaderTest, self).setUp()
      self.addCleanup(mock.patch.stopall)
      self.downloader = downloader.get_downloader(10, hashlib.sha256)
      self.tmp_dir = tempfile.mkdtemp(
          dir=tf.compat.v1.test.get_temp_dir()
      )
      self.url = "http://example.com/foo.tar.gz"
      self.resource = resource_lib.Resource(url=self.url)
      self.path = os.path.join(self.tmp_dir, "foo.tar.gz")
      self.incomplete_path = "%s.incomplete" % self.path
      self.response = b"This \nis an \nawesome\n response!"
      self.resp_checksum = hashlib.sha256(self.response).hexdigest()
      self.cookies = {}
      mock.patch.object(
          downloader.requests.Session,
          "get",
          lambda *a, **kw: _FakeResponse(
              self.url, self.response, self.cookies
          ),
      ).start()
      self.downloader._pbar_url = mock.MagicMock()
      self.downloader._pbar_dl_size = mock.MagicMock()
      mock.patch.object(
          downloader.urllib.request,
          "urlopen",
          lambda *a, **kw: _FakeResponse(
              self.url, self.response, self.cookies
          ),
      ).start()
  
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 1 for calling the DownloaderTest obj's underlying member method code with example usage: obj.setUp() without return types