def _recursively_embed(self, doc, update_state=True):
        '''Crafts a navigator from a hal-json embedded document'''
        self_link = None
        self_uri = utils.getpath(doc, '_links.self.href')
        if self_uri is not None:
            uri = urlparse.urljoin(self.uri, self_uri)
            self_link = Link(
                uri=uri,
                properties=utils.getpath(doc, '_links.self')
            )
        curies = utils.getpath(doc, '_links.curies')
        state = utils.getstate(doc)
        if self_link is None:
            nav = OrphanHALNavigator(
                link=None,
                response=None,
                parent=self,
                core=self._core,
                curies=curies,
                state=state,
            )
        else:
            nav = HALNavigator(
                link=self_link,
                response=None,
                core=self._core,
                curies=curies,
                state=state,
            )
        if update_state:
            nav.state = state

        links = self._make_links_from(doc)
        if links is not None:
            nav._links = links
        embedded = self._make_embedded_from(doc)
        if embedded is not None:
            nav._embedded = embedded
        return nav
dataset/ETHPy150Open deontologician/restnavigator/restnavigator/halnav.py/HALNavigatorBase._recursively_embed/original