import random


def random_choice(gene):
    """
    Randomly select a object, such as strings, from a list. Gene must have defined `choices` list.

    Args:
        gene (Gene): A gene with a set `choices` list.

    Returns:
        object: Selected choice.
    """
    if not 'choices' in gene.__dict__:
        raise KeyError("'choices' not defined in this gene, please include a list values!")
    return random.choice(gene.choices)