Returns `to_path` once resource has been extracted there.

def _sync_extract(self, from_path, method, to_path):
    """Returns `to_path` once resource has been extracted there."""
    to_path_tmp = '%s%s_%s' % (to_path, constants.INCOMPLETE_SUFFIX,
                               uuid.uuid4().hex)
    try:
      for path, handle in iter_archive(from_path, method):
        _copy(handle, path and os.path.join(to_path_tmp, path) or to_path_tmp)
    except BaseException as err:
      msg = 'Error while extracting %s to %s : %s' % (from_path, to_path, err)
      raise ExtractError(msg)
    # `tf.io.gfile.Rename(overwrite=True)` doesn't work for non empty
    # directories, so delete destination first, if it already exists.
    if tf.io.gfile.exists(to_path):
      tf.io.gfile.rmtree(to_path)
    tf.io.gfile.rename(to_path_tmp, to_path)
    self._pbar_path.update(1)
    return to_path