def to_bool(value):
if value is None:<EOL><INDENT>return None<EOL><DEDENT>if isinstance(value, bool):<EOL><INDENT>return value<EOL><DEDENT>elif isinstance(value, str):<EOL><INDENT>if value=="<STR_LIT>":<EOL><INDENT>return False<EOL><DEDENT>elif value=="<STR_LIT:yes>":<EOL><INDENT>return True<EOL><DEDENT><DEDENT>
Convert a value to boolean
:param value: the value to convert
:type value: any type
:return: a boolean value
:rtype: a boolean