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"]
code: def new_instance(
      instance_id: str,
      instance_type: str,
      request_id: str = "",
  ) -> Instance:
      instance = Instance()
      instance.version = (
          0  # it will be populated by the underlying storage.
      )
      instance.instance_id = instance_id
      instance.instance_type = instance_type
      instance.launch_request_id = request_id
      instance.status = Instance.QUEUED
      InstanceUtil._record_status_transition(
          instance, Instance.QUEUED, "created from InstanceUtil"
      )
      return instance
  
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 1 for calling the InstanceUtil obj's underlying member method code with example usage: obj.new_instance(instance_id, instance_type, request_id) and returns: instance