code: def decompress(file_obj, file_type):
      
  
      def is_zip():
          archive = zipfile.ZipFile(file_obj)
          result = {name: wrap_as_stream(archive.read(name))
                    for name in archive.namelist()}
          return result
  
      def is_tar():
          import tarfile
          archive = tarfile.open(fileobj=file_obj, mode='r')
          result = {name: archive.extractfile(name)
                    for name in archive.getnames()}
          return result
  
      file_type = str(file_type).lower()
      if isinstance(file_obj, bytes):
          file_obj = wrap_as_stream(file_obj)
  
      if file_type[-3:] == 'zip':
          return is_zip()
      if 'tar' in file_type[-6:]:
          return is_tar()
      raise ValueError('Unsupported type passed!')
docs: Given an open file object and a file type, return all components
      of the archive as open file objects in a dict.
  
      Parameters
      -----------
      file_obj : file-like
        Containing compressed data
      file_type : str
        File extension, 'zip', 'tar.gz', etc
  
      Returns
      ---------
      decompressed : dict
        Data from archive in format {file name : file-like}