code: def family_with_trials(two_experiments, orionstate):
      """Create two related experiments with all types of trials."""
  
      exp = experiment_builder.build(
          name="test_double_exp", storage=orionstate.storage
      )
      exp2 = experiment_builder.build(
          name="test_double_exp_child", storage=orionstate.storage
      )
      x = {"name": "/x", "type": "real"}
      y = {"name": "/y", "type": "real"}
  
      x_value = 0
      for status in Trial.allowed_stati:
          x["value"] = x_value
          y["value"] = x_value
          trial = Trial(experiment=exp.id, params=[x], status=status)
          x["value"] = x_value + 0.5  # To avoid duplicates
          trial2 = Trial(
              experiment=exp2.id, params=[x, y], status=status
          )
          x_value += 1
          orionstate.database.write("trials", trial.to_dict())
          orionstate.database.write("trials", trial2.to_dict())
  
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 14 for calling a global function with example usage: family_with_trials(two_experiments, orionstate) without return types