code: def call_domain(domain, spec, ctrl, trial, view, eid, tid):
      rv = {"loss": None, "status": "fail"}
      # TODO: rt unused
      rt = coarse_utcnow()
      # print "in call domain for spec", str(spec)
      promise = None
      fn, pyll_rval = domain.evaluate_async(spec, ctrl)
      promise = IPYAsync(
          view.apply_async(fn, pyll_rval), domain, rv, eid, tid, ctrl
      )
  
      return promise
  
imports: from time import sleep, time
  import numpy
  from .base import Trials
  from .base import Domain
  from .base import JOB_STATE_NEW
  from .base import JOB_STATE_RUNNING
  from .base import JOB_STATE_DONE
  from .base import JOB_STATE_ERROR
  from .base import spec_from_misc
  from .base import Ctrl
  from .utils import coarse_utcnow
  import sys
label_desc: Use image node_id 1 for calling a global function with example usage: call_domain(domain, spec, ctrl, trial, view, eid, tid) and returns: promise