class_docstr: Setup global variables and storage for tests.
  
  It generates a new storage configuration and swaps it,
  the previous configuration is restored after the test.
  It also initializes PickleDB as the storage for testing.
  We use PickledDB as our storage mock
  
  Parameters
  ----------
  benchmarks: List, optional
     List of benchmarks to insert into the database
  experiments: list, optional
      List of experiments to insert into the database
  trials: list, optional
      List of trials to insert into the database
  workers: list, optional
      List of workers to insert into the database
  lies: list, optional
      List of lies to insert into the database
  resources: list, optional
      List of resources to insert into the database
  from_yaml: YAML, optional
      YAML config to apply for this test
  storage: dict, optional
      Configuration of the underlying storage backend
  
  Examples
  --------
  >>> my_config = {...}
  >>> with OrionState(my_config):
      ...
class_docstr_tok: ["Setup","global","variables","and","storage","for","tests",".","It","generates","a","new","storage","configuration","and","swaps","it",",","the","previous","configuration","is","restored","after","the","test",".","It","also","initializes","PickleDB","as","the","storage","for","testing",".","We","use","PickledDB","as","our","storage","mock","Parameters","--","--","--","--","--","benchmarks",":","List",",","optional","List","of","benchmarks","to","insert","into","the","database","experiments",":","list",",","optional","List","of","experiments","to","insert","into","the","database","trials",":","list",",","optional","List","of","trials","to","insert","into","the","database","workers",":","list",",","optional","List","of","workers","to","insert","into","the","database","lies",":","list",",","optional","List","of","lies","to","insert","into","the","database","resources",":","list",",","optional","List","of","resources","to","insert","into","the","database","from_yaml",":","YAML",",","optional","YAML","config","to","apply","for","this","test","storage",":","dict",",","optional","Configuration","of","the","underlying","storage","backend","Examples","--","--","--","--",">",">",">","my_config","=","{","...","}",">",">",">","with","OrionState","(","my_config",")",":","..."]
docstr: Add trials to the database
docstr_tok: ["Add","trials","to","the","database"]
code: def add_trials(self, *trials):
      """Add trials to the database"""
      for trial in trials:
          nt = self.storage.register_trial(Trial(**trial))
          self.trials.append(nt)
  
imports: import copy
  import os
  import tempfile
  import yaml
  import orion
  from orion.core.io import experiment_builder
  from orion.core.worker.trial import Trial
  from orion.storage.base import setup_storage, storage_factory
label_desc: Use image node_id 7 for calling the BaseOrionState obj's underlying member method code with example usage: obj.add_trials() without return types