class_docstr: Interface for a resource scheduler.
  
  Implements the `instance_manager.proto ResourceSchedulerService` interface.
class_docstr_tok: ["Interface","for","a","resource","scheduler",".","Implements","the","`","instance_manager.proto","ResourceSchedulerService","`","interface","."]
docstr: Given the resource requests and the current cluster state, calculate the
  target cluster shape by trying to schedule the resource requests on the
  nodes.
docstr_tok: ["Given","the","resource","requests","and","the","current","cluster","state",",","calculate","the","target","cluster","shape","by","trying","to","schedule","the","resource","requests","on","the","nodes","."]
code: def schedule(self, request: SchedulingRequest) -> SchedulingReply:
      """
      Given the resource requests and the current cluster state, calculate the
      target cluster shape by trying to schedule the resource requests on the
      nodes.
      """
      pass
  
imports: import copy
  import logging
  from abc import ABC, abstractmethod
  from collections import defaultdict
  from dataclasses import dataclass, field
  from enum import Enum
  from typing import Dict, List, Optional, Tuple
  from google.protobuf.json_format import MessageToDict
  from ray.autoscaler._private.resource_demand_scheduler import UtilizationScore
  from ray.autoscaler.v2.instance_manager.config import NodeTypeConfig
  from ray.autoscaler.v2.schema import NodeType
  from ray.autoscaler.v2.utils import is_pending, resource_requests_by_count
  from ray.core.generated.autoscaler_pb2 import ClusterResourceConstraint, GangResourceRequest, NodeState, ResourceRequest, ResourceRequestByCount
  from ray.core.generated.instance_manager_pb2 import Instance
label_desc: Use image node_id 1 for calling the IResourceScheduler obj's underlying member method code with example usage: obj.schedule(request) without return types