'Removes cgroup.
:param pwd: cgroup directory.'

def rm_cgroup(self, pwd):

    if isinstance(pwd, int):
        pwd = self.cgroups[pwd]
    try:
        os.rmdir(pwd)
        self.cgroups.remove(pwd)
    except ValueError:
        logging.warn("cg.rm_cgroup():    Removed    cgroup    which    wasn't    createdusing    this    Cgroup")
    except Exception as inst:
        raise error.TestError(('cg.rm_cgroup():    %s' % inst))
