def transform_outgoing(self, son, collection):
        """Transform an object retrieved from the database"""
        if 'type' in son:
            klass = classify(son['type'])
            return klass.demongofy(son)
        else:
            try:
                return collection_to_class[collection].demongofy(son)
            except KeyError:
                return son
dataset/ETHPy150Open ebroder/anygit/anygit/backends/mongodb.py/TransformObject.transform_outgoing/original