code: def test0():
      try:
          client = Client(debug=True)
      except OSError:
          raise SkipTest()
  
      client[:].use_cloudpickle()
      trials = IPythonTrials(client, "log")
  
      def simple_objective(args):
          # -- why are these imports here !?
          # -- is it because they need to be imported on the client?
          #
          # Yes, the client namespace is empty, so some imports may be
          # needed here. Errors on the engines can be found by
          # using debug=True when instantiating the Client.
          import hyperopt
  
          return {"loss": args**2, "status": hyperopt.STATUS_OK}
  
      space = hyperopt.hp.uniform("x", 0, 1)
  
      minval = trials.fmin(
          simple_objective,
          space=space,
          algo=hyperopt.tpe.suggest,
          max_evals=25,
          verbose=True,
      )
      print(minval)
      assert minval["x"] < 0.2
  
file_path: hyperopt/hyperopt/tests/unit/test_ipy.py
imports: import sys
  from nose import SkipTest
  from hyperopt.ipy import IPythonTrials
  import hyperopt.hp
  import hyperopt.tpe
  import hyperopt
label_desc: Use image node_id 1 for calling a global function with example usage: test0() and returns: dict