@staticmethod
def deserialize_boolean(read):
    """Return a boolean"""
    if type(read) is bool:
        return read
    if type(read) is int and read in (0, 1):
        return bool(read)
    if read.lower() in ('true', 't', 'yes', '1'):
        return True
    if read.lower() in ('false', 'f', 'no', '0'):
        return False
    raise ValueError('Unknown boolean value {!s}'.format(read))
