code: def keep_session_alive(self):
          
  
          try:
              self.resources()
          except xmlrpclib.Fault as fault:
              if fault.faultCode == 5:
                  self.login()
              else:
                  raise
docs: If the session expired, logs back in.