code: def parse_bool(obj):
    
    if type(obj) is str:
      TRUTH_VALUE_SET = ["true", "1", "yes", "t", "on"]
      return obj.lower() in TRUTH_VALUE_SET
    else:
      return bool(obj)
docs: Return true if the object represents a truth value, false otherwise.
  
    For bool and numeric objects, uses Python's built-in bool function.  For
    str objects, checks string against a list of possible truth values.
  
    Args:
      obj: object to determine boolean value of; expected
  
    Returns:
      Boolean value according to 5.1 of Python docs if object is not a str
        object.  For str objects, return True if str is in TRUTH_VALUE_SET
        and False otherwise.
      http://docs.python.org/library/stdtypes.html