from typing import TextIO


def _get_line(reader: TextIO) -> str:
    """ Returns the next line from a file.

    Args:
        reader: The reader that reads from the file.

    Returns:
        The next line that corresponds to an action taken by the bot.
    """
    while True:
        line = reader.readline()
        if line in ['', 'START\n'] or line.split(',')[0] in ['CHOOSE_BET',
                                                             'SPLIT?',
                                                             'DOUBLE?',
                                                             'HIT/STAND',]:
            return line