def from_resource(cls, name, hotspot = None, **kwds): def load(path): image = Image.from_resource(name, **kwds) return cls(image, hotspot or _hotspot_for_resource(name)) return get_resource(load, name)
def from_resource(cls, name, **kwds): return get_resource(cls, name, **kwds)