def _validate_nodes_with_data(self, names):
names = names if isinstance(names, list) else [names]<EOL>if not names:<EOL><INDENT>raise RuntimeError("<STR_LIT>")<EOL><DEDENT>for ndict in names:<EOL><INDENT>if (not isinstance(ndict, dict)) or (<EOL>isinstance(ndict, dict) and (set(ndict.keys()) != set(["<STR_LIT:name>", "<STR_LIT:data>"]))<EOL>):<EOL><INDENT>raise RuntimeError("<STR_LIT>")<EOL><DEDENT>name = ndict["<STR_LIT:name>"]<EOL>if (not isinstance(name, str)) or (<EOL>isinstance(name, str)<EOL>and (<EOL>("<STR_LIT:U+0020>" in name)<EOL>or any(<EOL>[<EOL>element.strip() == "<STR_LIT>"<EOL>for element in name.strip().split(self._node_separator)<EOL>]<EOL>)<EOL>)<EOL>):<EOL><INDENT>raise RuntimeError("<STR_LIT>")<EOL><DEDENT><DEDENT>
Validate NodeWithData pseudo-type.