@classmethod
    def load(cls, filename, paths=None):
        '''Load the resource from the XML in the specified file.
        '''
        # make sure we can find files relative to this one
        dirname = os.path.dirname(filename)
        if dirname:
            if paths:
                paths = list(paths)
            else:
                paths = []
            paths.append(dirname)

        if filename in cls.cache:
            if cls.cache[filename] is cls.NOT_LOADED:
                raise ResourceError(filename%'Loop in XML files loading "%s"')
            return cls.cache[filename]

        cls.cache[filename] = cls.NOT_LOADED
        obj = cls(filename, paths)
        cls.cache[filename] = obj
        return obj
dataset/ETHPy150Open ardekantur/pyglet/contrib/scene2d/resource.py/Resource.load/swapped operands of `%`