def METHOD_NAME(path: str) -> Optional[str]:
    """
    Prompts user to choose from multiple options that can be allowlisted from a
    given URL.
    Args:
        path: URL to be allowlisted.
    Returns:
        Specific namespace or repository that is to be allowlisted. `None` if
        input is interrupted.
    """
    parts = path.count("/")
    for i in range(parts + 1):
        to_be_manipulated = path.rsplit("/", i)[0]
        click.echo(f"{i + 1}. {to_be_manipulated}")
    if choice := click.prompt(
        "Choose variant you want to allowlist",
        type=click.types.IntRange(min=1, max=parts + 1),
    ):
        return RepoUrl().convert(path.rsplit("/", choice - 1)[0])
    return None