class_docstr: Resource Spec.
  
  Contains node and SSH information found by parsing a `resource_spec.yml`.
  
  # TODO: Make it a real Graph (a clique), with edge weights being network bandwidth.
      This would allow for even more intelligent strategy generation.
class_docstr_tok: ["Resource","Spec",".","Contains","node","and","SSH","information","found","by","parsing","a","`","resource_spec.yml","`",".","#","TODO",":","Make","it","a","real","Graph","(","a","clique",")",",","with","edge","weights","being","network","bandwidth",".","This","would","allow","for","even","more","intelligent","strategy","generation","."]
docstr: Return all node addresses.
code: def nodes(self):
      """Return all node addresses."""
      if not self.__nodes:
          self.__nodes = {
              v.host_address for v in self.__devices.values()
          }  # set
      return self.__nodes
  
imports: import os
  import re
  from enum import Enum
  from typing import NamedTuple, Optional, Dict
  import yaml
  import paramiko
  from autodist.utils import logging
  from autodist.utils.network import is_loopback_address, is_local_address
label_desc: Use image node_id 4 for calling the ResourceSpec obj's underlying member method code with example usage: obj.nodes() and returns: self