def _adapt_parent_trials(node, parent_trials_node):
    """Adapt trials from the parent recursively

    .. note::

        To call with node.map(fct, node.parent) to connect with parents

    """
    if parent_trials_node is not None:
        adapter = node.item['experiment'].refers['adapter']
        for parent in parent_trials_node.root:
            parent.item['trials'] = adapter.forward(parent.item['trials'])
    return node.item, parent_trials_node
