code: def _add_event(
      self,
      ex_info,
      command,
      host_info,
      config,
      meta_info,
      _id,
      status,
      **kwargs,
  ):
      from .sql_bases import Base, Experiment, Host, Run
  
      Base.metadata.create_all(self.engine)
      sql_exp = Experiment.get_or_create(ex_info, self.session)
      sql_host = Host.get_or_create(host_info, self.session)
      if _id is None:
          i = self.session.query(Run).order_by(Run.id.desc()).first()
          _id = 0 if i is None else i.id + 1
  
      self.run = Run(
          run_id=str(_id),
          config=json.dumps(flatten(config)),
          command=command,
          priority=meta_info.get("priority", 0),
          comment=meta_info.get("comment", ""),
          experiment=sql_exp,
          host=sql_host,
          status=status,
          **kwargs,
      )
      self.session.add(self.run)
      self.save()
      return _id or self.run.run_id
  
imports: import json
  from threading import Lock
  import warnings
  from sacred.commandline_options import cli_option
  from sacred.observers.base import RunObserver
  from sacred.serializer import flatten
label_desc: Use image node_id 6 for calling the SqlObserver obj's underlying member method code with example usage: obj._add_event(ex_info, command, host_info, config, meta_info, _id, status) and returns: unknown