(
    allocated_resources: ClustermanResources,
    pending_pods: Optional[List[Tuple[KubernetesPod, PodUnschedulableReason]]] = None,
)
return resource_request + allocated_resources
Given a list of metrics, construct a resource request based on the most recent
    data for allocated and pending pods
Given a list of metrics, construct a resource request based on the most recent
    data for allocated and pending pods
Given a list of metrics construct a resource request based on the most recent data for allocated and pending pods
def _get_resource_request(
    allocated_resources: ClustermanResources,
    pending_pods: Optional[List[Tuple[KubernetesPod, PodUnschedulableReason]]] = None,
) -> SignalResourceRequest:
    """ Given a list of metrics, construct a resource request based on the most recent
    data for allocated and pending pods """

    resource_request = SignalResourceRequest()
    pending_pods = pending_pods or []
    if pending_pods:
        for pod, reason in pending_pods:
            if reason == PodUnschedulableReason.InsufficientResources:
                # This is a temporary measure to try to improve scaling behaviour when Clusterman thinks
                # there are enough resources but no single box can hold a new pod.  The goal is to replace
                # this with a more intelligent solution in the future.
                resource_request += total_pod_resources(pod) * 2

    return resource_request + allocated_resources
def _get_resource_request ( allocated_resources : ClustermanResources , pending_pods : Optional [ List [ Tuple [ KubernetesPod , PodUnschedulableReason ] ] ] = None , ) -> SignalResourceRequest : resource_request = SignalResourceRequest ( ) pending_pods = pending_pods or [ ] if pending_pods : for pod , reason in pending_pods : if reason == PodUnschedulableReason . InsufficientResources : # This is a temporary measure to try to improve scaling behaviour when Clusterman thinks # there are enough resources but no single box can hold a new pod.  The goal is to replace # this with a more intelligent solution in the future. resource_request += total_pod_resources ( pod ) * 2 return resource_request + allocated_resources