def _get_parent_id(self):
        """If this async is in within another async set that async id as the
        parent.
        """
        parent_id = self._options.get('parent_id')
        if parent_id:
            return parent_id

        from furious.context import get_current_async

        try:
            async = get_current_async()
        except errors.NotInContextError:
            async = None

        if async:
            parent_id = ":".join([async.parent_id.split(":")[0], async.id])
        else:
            parent_id = self.request_id

        self.update_options(parent_id=parent_id)

        return parent_id
def _get_parent_id ( self ) : parent_id = self . _options . get ( 'parent_id' ) if parent_id : return parent_id from furious . context import get_current_async try : async = get_current_async ( ) except errors . NotInContextError : async = None if async : parent_id = ":" . join ( [ async . parent_id . split ( ":" ) [ 0 ] , async . id ] ) else : parent_id = self . request_id self . update_options ( parent_id = parent_id ) return parent_id
If this async is in within another async set that async id as the
        parent.