def __getitem__(self, name):
        path = os.path.join(self.base_path, self.path, name)

        with open(path) as f:
            content = f.read().strip()

        if name == 'tasks' or '\n' in content or ' ' in content:
            content = content.split('\n')

            if ' ' in content[0]:
                content = dict((re.split(' +', l, 1) for l in content if content))
                for k, v in content.items():
                    content[k] = self._coerce(v)
            else:
                content = [self._coerce(v) for v in content if v]

        else:
            content = self._coerce(content)

        return content
dataset/ETHPy150Open yadutaf/ctop/cgroup_top.py/Cgroup.__getitem__/original