@classmethod
    def attach_content_instances(cls, nodes):
        needed_nodes = [i for i in nodes if '_content_cache' not in i.__dict__]
        contents = cls.fetch_content_instances(needed_nodes)
        for node in needed_nodes:
            node.content = contents[node.content_type_id][node.content_id]
        for node in nodes:
            node.content.node = node
        return nodes
Find the neighbour of this photo in the supplied gallery.
dataset/ETHPy150Open fusionbox/django-widgy/widgy/models/base.py/Node.attach_content_instances--crossover with--dataset/ETHPy150Open jdriscoll/django-photologue/photologue/models.py/Photo.get_previous_in_gallery