def get_multi_wrapper(classes):
    doctype_attr = doctype_attr_of(classes.values())

    def wrap(doc):
        doc_type = doc.get(doctype_attr)
        try:
            cls = classes[doc_type]
        except __HOLE__:
            raise DocTypeError(
                "the document being wrapped has doc type {0!r}. "
                "To wrap it anyway, you must explicitly pass in "
                "classes={{{0!r}: <document class>}} to your view. "
                "This behavior is new starting in 0.6.2.".format(doc_type)
            )
        return cls.wrap(doc)

    return wrap
dataset/ETHPy150Open benoitc/couchdbkit/couchdbkit/schema/util.py/get_multi_wrapper