<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def mkdir(self, children, mode=0o0755, return_node=True):
 """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. """

        result = None

        if isinstance(children, (str, unicode)):
            if os.path.isabs(children):
                raise BadValueError('Cannot mkdir an absolute path: {path}'.format(path=self._pyerarchy_path))

            rel_path = os.path.join(self._pyerarchy_path, children)
            os.makedirs(rel_path, mode)

            if return_node:
                result = Node(rel_path)
        else:
            for child in children:
                self.mkdir(child, mode, False)

        return result