Check whether the given subsystem is enabled and is writable
        (i.e., new cgroups can be created for it).
        Produces a log message for the user if one of the conditions is not fulfilled.
        If the subsystem is enabled but not writable, it will be removed from
        this instance such that further checks with "in" will return "False".
        @return A boolean value.

def require_subsystem(self, subsystem, log_method=logging.warning):
        """
        Check whether the given subsystem is enabled and is writable
        (i.e., new cgroups can be created for it).
        Produces a log message for the user if one of the conditions is not fulfilled.
        If the subsystem is enabled but not writable, it will be removed from
        this instance such that further checks with "in" will return "False".
        @return A boolean value.
        """
        if not subsystem in self:
            log_method(
                'Cgroup subsystem %s is not enabled. '
                'Please enable it with "sudo mount -t cgroup none /sys/fs/cgroup".',
                subsystem)
            return False

        try:
            test_cgroup = self.create_fresh_child_cgroup(subsystem)
            test_cgroup.remove()
        except OSError as e:
            self.paths = set(self.per_subsystem.values())
            log_method(
                'Cannot use cgroup hierarchy mounted at {0} for subsystem {1}, reason: {2}. '
                'If permissions are wrong, please run "sudo chmod o+wt \'{0}\'".'
                .format(self.per_subsystem[subsystem], subsystem, e.strerror))
            del self.per_subsystem[subsystem]
            return False

        return True