code: def add_item(
      runhistory,
      config,
      cost: float = 0.0,
      time: float = 1.0,
      seed: int = 0,
      instance: str | None = None,
      budget: float | None = None,
      status=StatusType.SUCCESS,
  ) -> TrialKey:
      """No easy way to generate a key before hand."""
      runhistory.add(
          config=config,
          cost=cost,
          time=time,
          instance=instance,
          seed=seed,
          budget=budget,
          status=status,
      )
  
      return TrialKey(
          config_id=runhistory._n_id,  # What's used internally during `add`
          instance=instance,
          seed=seed,
          budget=budget,
      )
  
imports: from __future__ import annotations
  import os
  import pickle
  import tempfile
  import pytest
  from smac.runhistory.runhistory import RunHistory, TrialKey
  from smac.runner.abstract_runner import StatusType
label_desc: Use image node_id 15 for calling a global function with example usage: add_item(runhistory, config, cost, time, seed, instance, budget, status) and returns: TrialKey