def _BooleanAttribute(value):
 if (value in ['true', '1']):
  return True
 elif (value in ['false', '0']):
  return False
 else:
  return None

def _BooleanAttribute ( value ) : if ( value in [ 'true' , '1' ] ) : return True elif ( value in [ 'false' , '0' ] ) : return False else : return None
parse the given attribute value as a boolean value .