def METHOD_NAME(self) -> Optional[Dict[str, MetricValue]]:
    if self.metric_values_by_batch_id is None or self.batch_ids is None:
        return None
    batch_id: str
    return {
        batch_id: self.metric_values_by_batch_id.get(batch_id)
        for batch_id in self.batch_ids
        if batch_id in self.metric_values_by_batch_id
    }