code: def create_fake_trial(
      tid, loss=None, status=STATUS_OK, state=JOB_STATE_DONE
  ):
      return dict(
          tid=tid,
          result={"status": status, "loss": loss}
          if loss is not None
          else {"status": status},
          spec={"a": 1},
          misc={
              "tid": tid,
              "cmd": ("some cmd",),
              "idxs": {"z": [tid]},
              "vals": {"z": [1]},
          },
          extra="extra",  # -- more stuff here is ok
          owner=None,
          state=state,
          version=0,
          book_time=None,
          refresh_time=None,
          exp_key=None,
      )
  
imports: import copy
  import unittest
  import numpy
  import bson
  from hyperopt.pyll import scope
  from hyperopt.base import JOB_STATE_DONE, JOB_STATE_NEW
  from hyperopt.base import TRIAL_KEYS
  from hyperopt.base import TRIAL_MISC_KEYS
  from hyperopt.base import InvalidTrial
  from hyperopt.base import miscs_to_idxs_vals
  from hyperopt.base import SONify
  from hyperopt.base import STATUS_OK
  from hyperopt.base import Trials
  from hyperopt.base import trials_from_docs
  from hyperopt.exceptions import AllTrialsFailed
label_desc: Use image node_id 2 for calling a global function with example usage: create_fake_trial(tid, loss, status, state) and returns: dict