def METHOD_NAME(ctx, repo, archive, paths=None):
    extract_cmd = 'borg extract {repo}::"{archive}"'.format(repo=repo, archive=archive)
    if paths:
        extract_cmd = "{} {}".format(
            extract_cmd, " ".join('"{}"'.format(p) for p in paths)
        )
    print(extract_cmd)
    ctx.run(extract_cmd, env=environment(), echo=True)