code: def process_exp_rm(storage, root):
      """Delete the given experiment node and all its children."""
      trials_total = 0
      exp_total = 0
      for node in root:
          count = storage.delete_trials(uid=node.item.id)
          trials_total += count
          logger.debug(
              "%d trials deleted in experiment %s-v%d",
              count,
              node.item.name,
              node.item.version,
          )
          count = storage.delete_algorithm_lock(uid=node.item.id)
          logger.debug(
              "%s algorithm lock for experiment %s-v%d deleted",
              count,
              node.item.name,
              node.item.version,
          )
          count = storage.delete_experiment(uid=node.item.id)
          logger.debug(
              "%s experiment %s-v%d deleted",
              count,
              node.item.name,
              node.item.version,
          )
          exp_total += count
  
      print(f"{trials_total} trials deleted")
      print(f"{exp_total} experiments deleted")
  
file_path: orion/src/orion/core/cli/db/rm.py
imports: import argparse
  import logging
  import sys
  from orion.core.io import experiment_builder
  from orion.core.utils.pptree import print_tree
  from orion.core.utils.terminal import confirm_name
label_desc: Use image node_id 3 for calling a global function with example usage: process_exp_rm(storage, root) without return types