code: def process_updates(storage, root, query, update):
      """Update the matching trials of the given experiment and its children."""
      trials_total = 0
      for node in root:
          count = storage.update_trials(
              node.item, where=query, **update
          )
          logger.debug(
              "%d trials modified in experiment %s-v%d",
              count,
              node.item.name,
              node.item.version,
          )
          trials_total += count
  
      print(f"{trials_total} trials modified")
  
file_path: orion/src/orion/core/cli/db/set.py
imports: import argparse
  import logging
  import sys
  import orion.core.io.experiment_builder
  from orion.core.utils.pptree import print_tree
  from orion.core.utils.terminal import confirm_name
label_desc: Use image node_id 2 for calling a global function with example usage: process_updates(storage, root, query, update) without return types