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: Records the status transition.
  
  Args:
      instance: The instance to update.
      status: The new status to transition to.
docstr_tok: ["Records","the","status","transition",".","Args",":","instance",":","The","instance","to","update",".","status",":","The","new","status","to","transition","to","."]
code: def _record_status_transition(
      instance: Instance, status: Instance.InstanceStatus, details: str
  ):
      """Records the status transition.
  
      Args:
          instance: The instance to update.
          status: The new status to transition to.
      """
      now_ns = time.time_ns()
      instance.status_history.append(
          Instance.StatusHistory(
              instance_status=status,
              timestamp_ns=now_ns,
              details=details,
          )
      )
  
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 5 for calling the InstanceUtil obj's underlying member method code with example usage: obj._record_status_transition(instance, status, details) without return types