def __getitem__(self, key):
        for name, value in self._iter_contents():
            if key == name:
                break
        else:
            raise KeyError('Folder entry %s not found' % repr(key))

        if value == '/':
            qname = quote(name)
            child_ls = self.sub_tree[qname + '.ls']
            try:
                child_sub = self.sub_tree[qname + '.sub']
            except KeyError:
                child_sub = self.sub_tree.new_tree(qname + '.sub')
                self.storage._autocommit()
            return StorageDir(name, child_ls, child_sub,
                              self.path + name + '/',
                              self.storage, self)
        else:
            inode = self.storage.get_inode(value)
            return StorageFile(name, inode, self)
dataset/ETHPy150Open mgax/SpaghettiFS/spaghettifs/storage.py/StorageDir.__getitem__/original