code: def test_branch_from_selected_version(orionstate, monkeypatch):
      """Test that branching from a version passed with `--version` works."""
      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 --version 1 -b experiment_2 "
          "--enable-evc "
          "./black_box.py "
          "-x~normal(0,1) -z~+normal(0,1)"
      )
  
      storage = setup_storage()
      parent = storage.fetch_experiments(
          {"name": "experiment", "version": 1}
      )[0]
      exp = storage.fetch_experiments({"name": "experiment_2"})[0]
      assert exp["refers"]["parent_id"] == parent["_id"]
  
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 54 for calling a global function with example usage: test_branch_from_selected_version(orionstate, monkeypatch) without return types