def METHOD_NAME(liste, max_index=None):
    """
    """
    if max_index is not None:
        return liste[random.randint(0, max_index)]
    else:
        return liste[random.randint(0, len(liste)-1)]