def METHOD_NAME(self, level):
    did = self.display.allocate_resource_id()
    DamageCreate(display=self.display,
                 opcode=self.display.get_extension_major(extname),
                 damage=did,
                 drawable=self.id,
                 level=level,
                 )
    return did