@classmethod
  def RemoveInstance(cls, name):
    # Use cas operation to remove from instance name list.
    memcache_client = memcache.Client()
    while True:
      instances = memcache_client.gets(cls.ALL_INSTANCES)
      if not instances:
        break
      try:
        instances.remove(name)
      except ValueError:
        # The instance name was not in the list.
        break
      if memcache_client.cas(cls.ALL_INSTANCES, instances):
        break

    # Delete the entry for the instance in Memcache and Datastore.
    memcache.delete(name)
    datastore_single_instance = SingleInstance.GetByName(name)
    if datastore_single_instance:
      datastore_single_instance.delete()
Removes load information entry of the instance.
dataset/ETHPy150Open GoogleCloudPlatform/solutions-load-balanced-gaming-server-on-google-compute-engine/load_info.py/LoadInfo.RemoveInstance