code: def _adapt_parent_trials(node, parent_trials_node, ids):
      """Adapt trials from the parent recursively
  
      .. note::
  
          To call with node.map(fct, node.parent) to connect with parents
  
      """
      # Ids from children are passed to prioritized them if they are also present in parent nodes.
      node_ids = {
          trial.compute_trial_hash(trial, ignore_lie=True)
          for trial in node.item["trials"]
      } | ids
      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"]
              )
  
              # if trial is in current exp, filter out
              parent.item["trials"] = [
                  trial
                  for trial in parent.item["trials"]
                  if trial.compute_trial_hash(trial, ignore_lie=True)
                  not in node_ids
              ]
  
      return node.item, parent_trials_node
  
file_path: orion/src/orion/core/evc/experiment.py
imports: import functools
  import logging
  from orion.core.utils.tree import TreeNode
label_desc: Use image node_id 1 for calling a global function with example usage: _adapt_parent_trials(node, parent_trials_node, ids) and returns: node,  parent_trials_node