def download(self, url, listener=None, path_or_fd=None):
      if not url in self._map:
        raise IOError("404: Virtual URL '{}' does not exist.".format(url))
      if not path_or_fd:
        raise AssertionError("Expected path_or_fd to be set")
      path_or_fd.write(self._map[url])
      return path_or_fd
dataset/ETHPy150Open pantsbuild/pants/tests/python/pants_test/binaries/test_binary_util.py/BinaryUtilTest.MapFetcher.download/original