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:
        #each line is "id:subsystem,subsystem:path"
        ownCgroup = ownCgroup.strip().split(':')
        try:
            path = ownCgroup[2][1:] # remove leading /
        except __HOLE__:
            raise IndexError("index out of range for " + str(ownCgroup))
        for subsystem in ownCgroup[1].split(','):
            yield (subsystem, path)
dataset/ETHPy150Open sosy-lab/benchexec/benchexec/cgroups.py/_parse_proc_pid_cgroup