code: def _parse_boolean(value, default=False):
      
      if value is None:
          return default
      try:
          return bool(value)
      except ValueError:
          return default
docs: Attempt to cast *value* into a bool, returning *default* if it fails.