code: def test_init_w_version_from_parent_w_children(
      orionstate, monkeypatch, capsys
  ):
      """Test that init of experiment from version with children fails."""
      monkeypatch.chdir(os.path.dirname(os.path.abspath(__file__)))
      execute(
          "hunt --init-only -n experiment --config orion_config.yaml "
          "--enable-evc "
          "./black_box.py -x~normal(0,1)"
      )
      execute(
          "hunt --init-only -n experiment "
          "--enable-evc "
          "./black_box.py -x~normal(0,1) -y~+normal(0,1)"
      )
  
      execute(
          "hunt --init-only -n experiment -v 1 "
          "--enable-evc "
          "./black_box.py -x~normal(0,1) -y~+normal(0,1) -z~normal(0,1)",
          assert_code=1,
      )
  
      captured = capsys.readouterr()
      assert captured.out == ""
      assert (
          "Configuration is different and generates a branching event"
          in captured.err
      )
      assert "Experiment name" in captured.err
  
imports: import logging
  import os
  import pytest
  import yaml
  import orion.core.cli
  import orion.core.io.experiment_builder
  from orion.storage.base import setup_storage
label_desc: Use image node_id 50 for calling a global function with example usage: test_init_w_version_from_parent_w_children(orionstate, monkeypatch, capsys) without return types