class_docstr: Helper functions for testing.
  
  Primarily provided for tests that use fixture (and derived)
  `three_experiments_branch_same_name_trials_benchmarks`
class_docstr_tok: ["Helper","functions","for","testing",".","Primarily","provided","for","tests","that","use","fixture","(","and","derived",")","`","three_experiments_branch_same_name_trials_benchmarks","`"]
docstr: Check number of expected data in given database.
code: def check_db(
      db, nb_exps, nb_algos, nb_trials, nb_benchmarks, nb_child_exps=0
  ):
      """Check number of expected data in given database."""
      experiments = db.read("experiments")
      assert len(experiments) == nb_exps
      assert len(db.read("algo")) == nb_algos
      assert len(db.read("trials")) == nb_trials
      assert len(db.read("benchmarks")) == nb_benchmarks
  
      # Check we have expected number of child experiments.
      exp_map = {exp["_id"]: exp for exp in experiments}
      assert len(exp_map) == nb_exps
      child_exps = []
      for exp in experiments:
          parent = exp["refers"]["parent_id"]
          if parent is not None:
              assert parent in exp_map
              child_exps.append(exp)
      assert len(child_exps) == nb_child_exps
  
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 1 for calling the _Helpers obj's underlying member method code with example usage: obj.check_db(db, nb_exps, nb_algos, nb_trials, nb_benchmarks, nb_child_exps) without return types