def METHOD_NAME(self, format):
    r"""Reads a tar or targz archive.
    Parameters
    ----------
    format : str
        The format to be used for tarfile.open().
    """
    self._experiment_path = os.path.dirname(self._src)
    tar = tarfile.open(self._src, format)
    for name in tar.getnames():
        # Tar doesn't return unicode in Python 2
        uname = safe_decode(name)
        folder, fname = os.path.split(uname)
        # Ignore everything except the pool folder
        if folder != u'pool':
            continue
        # Filenames are encoded with U+XXXX notation in the archive. This is
        # necessary to deal with absence of good unicode support in .tar.gz.
        fname = self._syntax.from_ascii(fname)
        pool_folder = safe_str(
            self._pool.folder(),
            enc=sys.getfilesystemencoding()
        )
        tar.extract(name, pool_folder)
        from_name = os.path.join(self._pool.folder(), uname)
        to_name = os.path.join(self._pool.folder(), fname)
        os.rename(from_name, to_name)
        os.rmdir(os.path.join(self._pool.folder(), folder))
    # Temporarily extract the script file to the file pool, and remove it
    # right away
    script_path = os.path.join(self._pool.folder(), u'script.opensesame')
    tar.extract(u'script.opensesame', self._pool.folder())
    with safe_open(script_path) as fd:
        self._script = fd.read()
    os.remove(script_path)