def _parse_proc_pid_cgroup(content):
    """
    Parse a /proc/*/cgroup file into tuples of (subsystem,cgroup).
    @param content: An iterable over the lines of the file.
    @return: a generator of tuples
    """
    for ownCgroup in content:
        ownCgroup = ownCgroup.strip().split(':')
        try:
            path = ownCgroup[2][1:]
        except IndexError:
            raise IndexError('index out of range for ' + str(ownCgroup))
        for subsystem in ownCgroup[1].split(','):
            yield subsystem, path
