class_docstr: A helper class to group updates and operations on an Instance object defined
  in instance_manager.proto
class_docstr_tok: ["A","helper","class","to","group","updates","and","operations","on","an","Instance","object","defined","in","instance_manager.proto"]
docstr: Returns True if the instance is in a status where there could exist
  a cloud instance allocated by the cloud provider.
docstr_tok: ["Returns","True","if","the","instance","is","in","a","status","where","there","could","exist","a","cloud","instance","allocated","by","the","cloud","provider","."]
code: def is_cloud_instance_allocated(instance: Instance) -> bool:
      """
      Returns True if the instance is in a status where there could exist
      a cloud instance allocated by the cloud provider.
      """
      assert instance.status != Instance.UNKNOWN
      return instance.status in {
          Instance.ALLOCATED,
          Instance.RAY_INSTALLING,
          Instance.RAY_RUNNING,
          Instance.RAY_STOPPING,
          Instance.RAY_STOPPED,
          Instance.STOPPING,
          Instance.RAY_INSTALL_FAILED,
      }
  
file_path: ray/python/ray/autoscaler/v2/instance_manager/instance_manager.py
imports: import logging
  import time
  from abc import ABC, abstractmethod
  from typing import Dict, List, Optional, Set
  from ray.autoscaler.v2.schema import InvalidInstanceStatusError
  from ray.core.generated.instance_manager_pb2 import GetInstanceManagerStateReply, GetInstanceManagerStateRequest, Instance, UpdateInstanceManagerStateReply, UpdateInstanceManagerStateRequest
label_desc: Use image node_id 2 for calling the InstanceUtil obj's underlying member method code with example usage: obj.is_cloud_instance_allocated(instance) and returns: unknown