def istrue(value):
    """
    Accepts a string as input.
    
    If the string is one of  ``True``, ``On``, ``Yes``, or ``1`` it returns 
    ``True``.
    
    If the string is one of  ``False``, ``Off``, ``No``, or ``0`` it returns 
    ``False``.
    
    ``istrue`` is not case sensitive.
    
    Any other input will raise a ``KeyError``. 
    """
    return {
        'yes': True, 'no': False,
        'on': True, 'off': False, 
        '1': True, '0': False,
        'true': True, 'false': False,
        }[value.lower()]