def __getitem__(self, key):
        if key is None:
            return self
        elif isinstance(key, list) or isinstance(key, tuple):
            if len(key) > 1:
                return self.__getitem__(key[0]).__getitem__(key[1:])  # start a recursion
            elif len(key) == 1:
                return self.__getitem__(key[0])
            else:
                return self  # theme[][key] returns theme[key]
        else:
            try:
                return dict.__getitem__(self, key)
            except __HOLE__:
                if self.parent is not None:
                    return self.parent.__getitem__(key)
                else:
                    raise
dataset/ETHPy150Open jorgecarleitao/pyglet-gui/pyglet_gui/theme/theme.py/ScopedDict.__getitem__