code: def as_bool(self, key):
          
          val = self[key]
          if isinstance(val, bool):
              return val
          return val.lower() == "yes"
docs: Express given key's value as a boolean type.
  
          Typically, this is used for ``ssh_config``'s pseudo-boolean values
          which are either ``"yes"`` or ``"no"``. In such cases, ``"yes"`` yields
          ``True`` and any other value becomes ``False``.
  
          .. note::
              If (for whatever reason) the stored value is already boolean in
              nature, it's simply returned.
  
          .. versionadded:: 2.5