code: def check(self, status: ClusterStatus):
      actual = status.total_resources()
      if self.enforce_all and len(actual) != len(self.resources):
          raise CheckFailure(
              f"Expected {len(self.resources)} resources, got {len(actual)}"
          )
  
      for k, v in self.resources.items():
          if k not in actual and v:
              raise CheckFailure(f"Expected resource {k} not found")
  
          if not self.op(v, actual.get(k, 0)):
              raise CheckFailure(
                  f"Expected resource {k} {self.op} {v}, got {actual.get(k, 0)}"
              )
  
imports: import abc
  import operator
  from abc import abstractmethod
  from typing import Dict, List
  import ray
  from ray.autoscaler.v2.schema import ClusterStatus, ResourceUsage
  from ray.autoscaler.v2.sdk import get_cluster_status
  from ray.core.generated import autoscaler_pb2
  from ray.core.generated.instance_manager_pb2 import Instance
label_desc: Use image node_id 2 for calling the TotalResourceCheck obj's underlying member method code with example usage: obj.check(status) without return types