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 whenever a deployment replica is being stopped.
docstr_tok: ["Called","whenever","a","deployment","replica","is","being","stopped","."]
code: def on_replica_stopping(
      self, deployment_id: DeploymentID, replica_name: str
  ) -> None:
      """Called whenever a deployment replica is being stopped."""
      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 3 for calling the DeploymentScheduler obj's underlying member method code with example usage: obj.on_replica_stopping(deployment_id, replica_name) without return types