class_docstr: A centralized scheduler for all Serve deployments.
  
  It makes a batch of scheduling decisions in each update cycle.
class_docstr_tok: ["A","centralized","scheduler","for","all","Serve","deployments",".","It","makes","a","batch","of","scheduling","decisions","in","each","update","cycle","."]
docstr: Called for each update cycle to do batch scheduling.
  
  Args:
      upscales: a dict of deployment name to a list of replicas to schedule.
      downscales: a dict of deployment name to a downscale request.
  
  Returns:
      The name of replicas to stop for each deployment.
docstr_tok: ["Called","for","each","update","cycle","to","do","batch","scheduling",".","Args",":","upscales",":","a","dict","of","deployment","name","to","a","list","of","replicas","to","schedule",".","downscales",":","a","dict","of","deployment","name","to","a","downscale","request",".","Returns",":","The","name","of","replicas","to","stop","for","each","deployment","."]
code: def schedule(
      self,
      upscales: Dict[DeploymentID, List[ReplicaSchedulingRequest]],
      downscales: Dict[DeploymentID, DeploymentDownscaleRequest],
  ) -> Dict[DeploymentID, Set[str]]:
      """Called for each update cycle to do batch scheduling.
  
      Args:
          upscales: a dict of deployment name to a list of replicas to schedule.
          downscales: a dict of deployment name to a downscale request.
  
      Returns:
          The name of replicas to stop for each deployment.
      """
      raise NotImplementedError
  
imports: import copy
  import sys
  from abc import ABC, abstractmethod
  from collections import defaultdict
  from dataclasses import dataclass
  from typing import Callable, Dict, List, Optional, Set, Tuple
  import ray
  from ray.serve._private.cluster_node_info_cache import ClusterNodeInfoCache
  from ray.serve._private.common import DeploymentID
  from ray.serve._private.utils import get_head_node_id
  from ray.util.scheduling_strategies import PlacementGroupSchedulingStrategy
label_desc: Use image node_id 6 for calling the DeploymentScheduler obj's underlying member method code with example usage: obj.schedule(upscales, downscales) without return types