# dataclass do not require an init class@dataclassclassRequests:cpu:float# expressed in cpu coresmemory:int# expressed in bytes@staticmethoddeffrom_pod(pod:V1Pod):cpu=0.0memory=0forcontainerinpod.spec.containers:cpu+=parse_cpu_string(container.resources.requests["cpu"])memory+=parse_memory_string(container.resources.requests["memory"])returnRequests(cpu,memory)defadd(self,other):self.cpu+=other.cpuself.memory+=other.memory@frozenclassAnotherClass:cpu:floatmemory:intdefadd(self,other):self.cpu+=other.cpuself.memory+=other.memory