'Create the specified cgroup.
:param path: The path of the cgroup to create.
E.g. cpu/mygroup/mysubgroup
:return: the Node associated with the created cgroup.
:rtype: cgroupspy.nodes.Node'

def _create_cgroup(self, path):

    node = trees.Tree().root
    path_split = path.split(os.sep)
    for path_element in path_split:
        name_to_node = {x.name: x for x in node.children}
        if (path_element not in name_to_node):
            self.logger.debug('Creating    cgroup    {}    in    {}'.format(path_element, node.path))
            node = node.create_cgroup(path_element)
        else:
            self.logger.debug('Not    creating    cgroup    {}    in    {}    since    it    already    exists'.format(path_element, node.path))
            node = name_to_node[path_element]
    return node
