code: def trial(exp):
      """Return a Trial which is registered in DB."""
      trial = tuple_to_trial((1.0,), exp.space)
      heartbeat = datetime.datetime.utcnow()
      trial.experiment = exp.id
      trial.status = "reserved"
      trial.heartbeat = heartbeat
  
      setup_storage().register_trial(trial)
  
      return trial
  
file_path: orion/tests/unittests/core/worker/test_trial_pacemaker.py
imports: import datetime
  import time
  import pytest
  import orion.core.io.experiment_builder
  from orion.core.utils.format_trials import tuple_to_trial
  from orion.core.worker.trial_pacemaker import TrialPacemaker
  from orion.storage.base import setup_storage
label_desc: Use image node_id 3 for calling a global function with example usage: trial(exp) and returns: trial