code: def build_child_experiment(
      space=None, trials=None, name="child", parent="root"
  ):
      """Build a child experiment by branching from `parent` and generate trials."""
      if trials is None:
          trials = [None for i in range(6)]
  
      max_trials = get_experiment(parent).max_trials + len(trials)
  
      child = build_experiment(
          name=name,
          space=space,
          max_trials=max_trials,
          branching={"branch_from": parent, "enable": True},
      )
      assert child.name == name
      assert child.version == 1
  
      generate_trials(child, trials)
  
file_path: orion/src/orion/testing/evc.py
imports: import contextlib
  import copy
  from orion.client import build_experiment, get_experiment
  from orion.core.io.space_builder import DimensionBuilder
label_desc: Use image node_id 4 for calling a global function with example usage: build_child_experiment(space, trials, name, parent) without return types