def __getitem__(self, key):
        if isinstance(key, int):
            return self.tags[key]
        elif isinstance(key, basestring):
            for tag in self.tags:
                if tag.name == key:
                    return tag
            else:
                raise KeyError("Tag %s does not exist" % key)
        else:
            raise TypeError(type(key).__name__ % "key needs to be either name of tag, or index of tag, not a %s")
dataset/ETHPy150Open benbaptist/minecraft-wrapper/src/nbt.py/TAG_Compound.__getitem__/swapped operands of `%`