code: def generate_trial(tid, space):
      variables = space.keys()
      idxs = {v: [tid] for v in variables}
      vals = {k: [v] for k, v in space.items()}
      return {
          "state": base.JOB_STATE_NEW,
          "tid": tid,
          "spec": None,
          "result": {"status": "new"},
          "misc": {
              "tid": tid,
              "cmd": ("domain_attachment", "FMinIter_Domain"),
              "workdir": None,
              "idxs": idxs,
              "vals": vals,
          },
          "exp_key": None,
          "owner": None,
          "version": 0,
          "book_time": None,
          "refresh_time": None,
      }
  
imports: from __future__ import print_function
  from __future__ import absolute_import
  from future import standard_library
  from builtins import str
  from builtins import object
  import functools
  import logging
  import os
  import sys
  import time
  import numpy
  from .None import pyll
  from .utils import coarse_utcnow
  from .None import base
label_desc: Use image node_id 1 for calling a global function with example usage: generate_trial(tid, space) and returns: dict