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