def _create_intermediate_nodes(self, name):
hierarchy = self._split_node_name(name, self.root_name)<EOL>node_tree = [<EOL>self.root_name<EOL>+ self._node_separator<EOL>+ self._node_separator.join(hierarchy[: num + <NUM_LIT:1>])<EOL>for num in range(len(hierarchy))<EOL>]<EOL>iobj = [<EOL>(child[: child.rfind(self._node_separator)], child)<EOL>for child in node_tree<EOL>if child not in self._db<EOL>]<EOL>for parent, child in iobj:<EOL><INDENT>self._db[child] = {"<STR_LIT>": parent, "<STR_LIT>": [], "<STR_LIT:data>": []}<EOL>self._db[parent]["<STR_LIT>"] = sorted(<EOL>self._db[parent]["<STR_LIT>"] + [child]<EOL>)<EOL><DEDENT>
Create intermediate nodes if hierarchy does not exist.