def boolean(string):
    """
    Function for reading True or False from a string.  Raises an error if the
    string is not True or False.
    """
    if string == 'True':
        return True
    if string == 'False':
        return False
    raise ValueError('bool must be True or False')