code: def adapt_trials(trials_tree):
      """Adapt trials recursively so that they are all compatible with current experiment."""
      trials_tree.map(_adapt_children_trials, trials_tree.children)
      ids = set()
      for child in trials_tree.children:
          for trial in child.item["trials"]:
              ids.add(trial.compute_trial_hash(trial, ignore_lie=True))
      trials_tree.map(
          functools.partial(_adapt_parent_trials, ids=ids),
          trials_tree.parent,
      )
  
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 3 for calling a global function with example usage: adapt_trials(trials_tree) without return types