code: def three_experiments_branch_same_name_trials(
      three_experiments_branch_same_name, orionstate, storage
  ):
      """Create three experiments, two of them with the same name but different versions and one
      with a child, and add trials including children trials.
  
      Add algorithm state for one experiment.
  
      NB: It seems 2 experiments are children:
      * test_single_exp_child.1 child of test_single_exp.2
      * test_single_exp.2 child of test_single_exp.1
      * test_single_exp.1 has no parent
      """
      exp1 = experiment_builder.build(
          name="test_single_exp", version=1, storage=storage
      )
      exp2 = experiment_builder.build(
          name="test_single_exp", version=2, storage=storage
      )
      exp3 = experiment_builder.build(
          name="test_single_exp_child", version=1, storage=storage
      )
  
      x = {"name": "/x", "type": "real"}
      y = {"name": "/y", "type": "real"}
      z = {"name": "/z", "type": "real"}
      x_value = 0.0
      for status in Trial.allowed_stati:
          x["value"] = x_value + 0.1  # To avoid duplicates
          y["value"] = x_value * 10
          z["value"] = x_value * 100
          trial1 = Trial(experiment=exp1.id, params=[x], status=status)
          trial2 = Trial(
              experiment=exp2.id, params=[x, y], status=status
          )
          trial3 = Trial(
              experiment=exp3.id, params=[x, y, z], status=status
          )
          # Add a child to a trial from exp1
          child = trial1.branch(params={"/x": 1})
          orionstate.database.write("trials", trial1.to_dict())
          orionstate.database.write("trials", trial2.to_dict())
          orionstate.database.write("trials", trial3.to_dict())
          orionstate.database.write("trials", child.to_dict())
          x_value += 1
      # exp1 should have 12 trials (including child trials)
      # exp2 and exp3 should have 6 trials each
  
      # Add some algo data for exp1
      orionstate.database.read_and_write(
          collection_name="algo",
          query={"experiment": exp1.id},
          data={
              "state": pickle.dumps(
                  {
                      "my_algo_state": "some_data",
                      "my_other_state_data": "some_other_data",
                  }
              )
          },
      )
  
imports: import copy
  import os
  import pickle
  import zlib
  from collections import Counter
  from tempfile import NamedTemporaryFile
  import pytest
  import yaml
  import orion.core.cli
  import orion.core.io.experiment_builder
  import orion.core.utils.backward
  from orion.core.worker.trial import Trial
  from orion.storage.backup import _get_exp_key, dump_database, get_experiment_parent_links, get_experiment_root_links, get_trial_parent_links
label_desc: Use image node_id 27 for calling a global function with example usage: three_experiments_branch_same_name_trials(three_experiments_branch_same_name, orionstate, storage) without return types