def mkdir(self, children, mode=<NUM_LIT>, return_node=True):
result = None<EOL>if isinstance(children, (str, unicode)):<EOL><INDENT>if os.path.isabs(children):<EOL><INDENT>raise BadValueError('<STR_LIT>'.format(path=self._pyerarchy_path))<EOL><DEDENT>rel_path = os.path.join(self._pyerarchy_path, children)<EOL>os.makedirs(rel_path, mode)<EOL>if return_node:<EOL><INDENT>result = Node(rel_path)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>for child in children:<EOL><INDENT>self.mkdir(child, mode, False)<EOL><DEDENT><DEDENT>return result<EOL>
Creates child entities in directory.

        Raises exception if the object is a file.

        :param children: The list of children to be created.
        :return: The child object, if one child is provided. None, otherwise.