code: def list_resources(self, session, query='?*::INSTR'):
          
  
          # For each session type, ask for the list of connected resources and
          # merge them into a single list.
  
          resources = sum([st.list_resources()
                           for key, st in sessions.Session.iter_valid_session_classes()], [])
  
          resources = rname.filter(resources, query)
  
          return resources
docs: Returns a tuple of all connected devices matching query.
  
          :param query: regular expression used to match devices.