Resolve from documents.

        :param pointer: foo
        :type pointer: DocumentPointer

def resolve(self, pointer):
        """Resolve from documents.

        :param pointer: foo
        :type pointer: DocumentPointer
        """

        dp = DocumentPointer(pointer)
        obj, fetcher = self.prototype(dp)

        for token in dp.pointer:
            obj = token.extract(obj, bypass_ref=True)
            reference = ref(obj)
            if reference:
                obj = fetcher.resolve(reference)
        return obj