def deserialize(self, source):
        """
        Returns a model instance
        """
        attrs = {}
        for k, v in source.iteritems():
            try:
                attrs[k] = self.deserialize_field(source, k)
            except (__HOLE__, FieldDoesNotExist):
                # m2m, abstract
                pass

        return self.instanciate(attrs)
        # TODO: we can assign m2ms now
dataset/ETHPy150Open liberation/django-elasticsearch/django_elasticsearch/serializers.py/EsJsonToModelMixin.deserialize