code: def available_resources(self) -> Dict[str, float]:
      if self.resource_usage is None:
          return {}
      return {
          r.resource_name: r.total - r.used
          for r in self.resource_usage.usage
      }
  
imports: import re
  from dataclasses import dataclass, field
  from enum import Enum
  from typing import Dict, List, Optional
  from ray.core.generated.instance_manager_pb2 import Instance
label_desc: Use image node_id 2 for calling the NodeInfo obj's underlying member method code with example usage: obj.available_resources() and returns: unknown, dict