<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_cgroup(self, name):
 """ Create a cgroup by name and attach it under this node. """

        node = Node(name, parent=self)
        if node in self.children:
            raise RuntimeError('Node {} already exists under {}'.format(name, self.path))

        name = name.encode()
        fp = os.path.join(self.full_path, name)
        os.mkdir(fp)
        self.children.append(node)
        return node