class_docstr: A formatter to format the ClusterStatus into a string.
  
  TODO(rickyx): We right now parse the ClusterStatus to the legacy format
  by using the `format_info_string`.
  In the future, we should refactor the `format_info_string` to directly format
  the ClusterStatus into a string as we migrate eventually away from v1.
class_docstr_tok: ["A","formatter","to","format","the","ClusterStatus","into","a","string",".","TODO","(","rickyx",")",":","We","right","now","parse","the","ClusterStatus","to","the","legacy","format","by","using","the","`","format_info_string","`",".","In","the","future",",","we","should","refactor","the","`","format_info_string","`","to","directly","format","the","ClusterStatus","into","a","string","as","we","migrate","eventually","away","from","v1","."]
code: def format(cls, data: ClusterStatus, verbose: bool = False) -> str:
      lm_summary = cls._parse_lm_summary(data)
      autoscaler_summary = cls._parse_autoscaler_summary(data)
  
      return format_info_string(
          lm_summary,
          autoscaler_summary,
          time=datetime.fromtimestamp(data.stats.request_ts_s),
          gcs_request_time=data.stats.gcs_request_time_s,
          non_terminated_nodes_time=data.stats.none_terminated_node_request_time_s,
          autoscaler_update_time=data.stats.autoscaler_iteration_time_s,
          verbose=verbose,
      )
  
imports: from collections import Counter, defaultdict
  from copy import deepcopy
  from datetime import datetime
  from itertools import chain
  from typing import Any, Dict, List, Tuple
  import ray
  from ray._private.ray_constants import AUTOSCALER_NAMESPACE, AUTOSCALER_V2_ENABLED_KEY
  from ray._private.utils import binary_to_hex
  from ray.autoscaler._private.autoscaler import AutoscalerSummary
  from ray.autoscaler._private.node_provider_availability_tracker import NodeAvailabilityRecord, NodeAvailabilitySummary, UnavailableNodeInformation
  from ray.autoscaler._private.util import LoadMetricsSummary, format_info_string
  from ray.autoscaler.v2.schema import NODE_DEATH_CAUSE_RAYLET_DIED, ClusterConstraintDemand, ClusterStatus, LaunchRequest, NodeInfo, NodeUsage, PlacementGroupResourceDemand, RayTaskActorDemand, ResourceDemand, ResourceDemandSummary, ResourceRequestByCount, ResourceUsage, Stats
  from ray.core.generated.autoscaler_pb2 import AutoscalingState, ClusterResourceState, GetClusterStatusReply, NodeState, NodeStatus, ResourceRequest
  from ray.core.generated.autoscaler_pb2 import ResourceRequestByCount
  from ray.core.generated.instance_manager_pb2 import Instance
  from ray.experimental.internal_kv import _internal_kv_get, _internal_kv_initialized
label_desc: Use image node_id 1 for calling the ClusterStatusFormatter obj's underlying member method code with example usage: obj.format(cls, data, verbose) and returns: format_info_string