class_docstr: Utility to make new experiments using the same storage object.
  
  Parameters
  ----------
  storage: dict or BaseStorageProtocol, optional
      Storage object or storage configuration.
  debug: bool, optional.
      If True, force using EphemeralDB for the storage. Default: False
class_docstr_tok: ["Utility","to","make","new","experiments","using","the","same","storage","object",".","Parameters","--","--","--","--","--","storage",":","dict","or","BaseStorageProtocol",",","optional","Storage","object","or","storage","configuration",".","debug",":","bool",",","optional",".","If","True",",","force","using","EphemeralDB","for","the","storage",".","Default",":","False"]
docstr: Create a new branch experiment with adapters for the given conflicts
code: def _branch_experiment(
      self, experiment, conflicts, version, branching_arguments
  ):
      """Create a new branch experiment with adapters for the given conflicts"""
      experiment_brancher = ExperimentBranchBuilder(
          conflicts, storage=self.storage, **branching_arguments
      )
  
      needs_manual_resolution = (
          not experiment_brancher.is_resolved
          or experiment_brancher.manual_resolution
      )
  
      if not experiment_brancher.is_resolved:
          name_conflict = conflicts.get([ExperimentNameConflict])[0]
          if not name_conflict.is_resolved and not version:
              log.debug(
                  "A race condition likely occurred during conflicts resolutions. "
                  "Now rolling back and attempting re-building the branched experiment."
              )
              raise RaceCondition(
                  "There was likely a race condition during version increment."
              )
  
      if needs_manual_resolution:
          log.debug("Some conflicts cannot be solved automatically.")
  
          # TODO: This should only be possible when using cmdline API
          branching_prompt = BranchingPrompt(experiment_brancher)
  
          if not sys.__stdin__.isatty():
              log.debug(
                  "No interactive prompt available to manually resolve conflicts."
              )
              raise BranchingEvent(branching_prompt.get_status())
  
          branching_prompt.cmdloop()
  
          if (
              branching_prompt.abort
              or not experiment_brancher.is_resolved
          ):
              sys.exit()
  
      log.debug("Creating new branched configuration")
      config = experiment_brancher.conflicting_config
      config["refers"][
          "adapter"
      ] = experiment_brancher.create_adapters().configuration
      config["refers"]["parent_id"] = experiment.id
  
      config.pop("_id")
  
      return self.create_experiment(mode="x", **config)
  
imports: from __future__ import annotations
  import copy
  import datetime
  import getpass
  import logging
  import pprint
  import sys
  import typing
  from typing import Any, TypeVar
  import orion.core
  from orion.algo.base import BaseAlgorithm, algo_factory
  from orion.algo.space import Space
  from orion.core.evc.adapters import BaseAdapter
  from orion.core.evc.conflicts import ExperimentNameConflict, detect_conflicts
  from orion.core.io import resolve_config
  from orion.core.io.config import ConfigurationError
  from orion.core.io.database import DuplicateKeyError
  from orion.core.io.experiment_branch_builder import ExperimentBranchBuilder
  from orion.core.io.interactive_commands.branching_prompt import BranchingPrompt
  from orion.core.io.space_builder import SpaceBuilder
  from orion.core.utils import backward
  from orion.core.utils.exceptions import BranchingEvent, NoConfigurationError, NoNameError, RaceCondition
  from orion.core.worker.experiment import Experiment, Mode
  from orion.core.worker.experiment_config import ExperimentConfig
  from orion.core.worker.primary_algo import create_algo
  from orion.core.worker.warm_start import KnowledgeBase
  from orion.storage.base import setup_storage
label_desc: Use image node_id 11 for calling the ExperimentBuilder obj's underlying member method code with example usage: obj._branch_experiment(experiment, conflicts, version, branching_arguments) and returns: self