def find_cgroups_of_process(pid):
    with open('/proc/{}/cgroup'.format(pid), 'rt') as cgroups_file:
        return find_my_cgroups(cgroups_file)
Return a Cgroup object that represents the cgroups of a given process.
dataset/ETHPy150Open sosy-lab/benchexec/benchexec/cgroups.py/find_cgroups_of_process