def extract_configs(configs, parent_dir):
    config_dir = os.path.join(parent_dir, "configs")

    if os.path.isdir(configs):
        shutil.copytree(configs, config_dir, symlinks=True)
    elif tarfile.is_tarfile(configs):
        with tarfile.open(configs, "r") as tar:
            tar.extractall(config_dir)
    else:
        raise errors.Error("Unknown configurations file type")

    return config_dir
Extracts configs to a new dir under parent_dir and returns it
dataset/ETHPy150Open letsencrypt/letsencrypt/certbot-compatibility-test/certbot_compatibility_test/util.py/extract_configs