code: def is_available(self):
          
          # if the availability flag is raised, return True immediately.
          # NOTE: subsequent API failures will lower this flag. we do this here
          # to ensure we don't keep hitting Joe with requests while availability
          # is there.
          if self.server_available:
              return True
  
          # otherwise, we have to check with the cloud.
          else:
  
              try:
                  self.server_available = self.jbx.server_online()
                  return self.server_available
              except jbxapi.JoeException:
                  pass
  
          self.server_available = False
          return False
docs: Determine if the Joe Sandbox API server is alive.
  
          :rtype:  bool
          :return: True if service is available, False otherwise.