code: def _get_node(self, node_id):
          
          self.non_terminated_nodes({})  # Side effect: updates cache
  
          if node_id in self.cached_nodes:
              return self.cached_nodes[node_id]
  
          # Node not in {pending, running} -- retry with a point query. This
          # usually means the node was recently preempted or terminated.
          matches = list(self.ec2.instances.filter(InstanceIds=[node_id]))
          assert len(matches) == 1, "Invalid instance id {}".format(node_id)
          return matches[0]
docs: Refresh and get info for this node, updating the cache.