code: def is_logon(self, verify=False):
          
          if self._session_id is None:
              return False
          if verify:
              try:
                  self.get('/api/console', logon_required=True)
              except ServerAuthError:
                  return False
          return True
docs: Return a boolean indicating whether the session is currently logged on
          to the HMC.
  
          By default, this method checks whether there is a session-id set
          and considers that sufficient for determining that the session is
          logged on. The `verify` parameter can be used to verify the validity
          of a session-id that is already set, by issuing a dummy operation
          ("Get Console Properties") to the HMC.
  
          Parameters:
  
            verify (bool): If a session-id is already set, verify its validity.