code: def nodes(self, tag):
          
          if tag == '*':
              return sorted(list(set(self.campaign.network.nodes)))
          definitions = self.campaign.network.tags.get(tag)
          if definitions is None:
              return []
          nodes = set()
          for definition in definitions:
              if len(definition.items()) == 0:
                  continue
              mode, value = list(definition.items())[0]
              if mode == 'match':
                  nodes = nodes.union(
                      set(
                          [
                              node
                              for node in self.campaign.network.nodes
                              if value.match(node)
                          ]
                      )
                  )
              elif mode == 'constraint':
                  slurm_nodes = os.environ.get('SLURM_JOB_NODELIST')
                  if slurm_nodes:
                      nodes = NodeSet(slurm_nodes)
                  else:
                      return ConstraintTag(tag, value)
              else:
                  assert mode == 'nodes'
                  nodes = nodes.union(set(value))
          return sorted(list(nodes))
docs: get nodes that belong to a tag
          :param tag: tag name
          :rtype: list of string