class_docstr: See :func:`~orion.testing.state.BaseOrionState`
class_docstr_tok: ["See",":","func",":","`","~orion.testing.state.BaseOrionState","`"]
docstr: Initialize environment before testing
docstr_tok: ["Initialize","environment","before","testing"]
code: def init(self, config):
      """Initialize environment before testing"""
      self.setup_storage(config)
      self.initialized = True
  
      if hasattr(self.storage, "_db"):
          self.database.remove("experiments", {})
          self.database.remove("trials", {})
  
      self.load_experience_configuration()
      return self
  
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 3 for calling the LegacyOrionState obj's underlying member method code with example usage: obj.init(config) and returns: self