def METHOD_NAME(self, obj):
    if IReferenceNamedImage.providedBy(obj.image):
        catalog = api.portal.get_tool('portal_catalog')
        brains = catalog.unrestrictedSearchResults(UID=self.context.image.reference)
        if len(brains) > 0:
            return brains[0].getObject()