def orphaned_photos(self):
        return self.photos.filter(is_public=True)\
                          .exclude(sites__id__in=self.sites.all())
Performs finalization actions after every record is written.
dataset/ETHPy150Open jdriscoll/django-photologue/photologue/models.py/Gallery.orphaned_photos--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/bulkload/connector_interface.py/ConnectorInterface.finalize_export