from typing import List
import random


def choose_random_restaurant(restaurants: List[str]) -> str:
    """Choose a random restaurant from a List[str] of restaurants.

    It's done the way it is because it's more testable than using
    random.choice, the noqa comment in the code disables the flake8 check for
    builtin psuedo-random number generators being used for crypto.

    Args:
        restaurants: List[str] of restaurants to choose from.

    Returns:
        The randomly chosen restaurant.

    Example:
        >>> from feedme import restaurant_chooser
        >>> rlist = ["Restaurant 1", "Restaurant 2", "Restaurant 3"]
        >>> restaurant_chooser.choose_random_restaurant(restaurants) in rlist
        True
    """
    return restaurants[random.randint(0, (len(restaurants) - 1))]