code: def sample_trials(
      space,
      num,
      seed=1,
      status=None,
      objective=None,
      params=None,
      exp_working_dir="/nothing",
  ):
      if params is None:
          params = {
              "f": space["f"].original_dimension.original_dimension.low
          }
  
      trials = space.sample(num, seed=seed)
      new_trials = []
      for trial in trials:
          if params:
              trial = trial.branch(params=params)
  
          trial = space.transform(space.reverse(trial))
          trial.experiment = 1
  
          trial.exp_working_dir = exp_working_dir
  
          if status:
              trial.status = status
          if status == "completed" and objective is not None:
              trial._results.append(
                  Trial.Result(
                      name="objective", type="objective", value=1
                  )
              )
  
          new_trials.append(trial)
  
      return new_trials
  
imports: from orion.algo.pbt.exploit import BaseExploit
  from orion.algo.pbt.explore import BaseExplore
  from orion.algo.pbt.pbt import LineageNode, Lineages
  from orion.core.utils.pptree import print_tree
  from orion.core.worker.trial import Trial
label_desc: Use image node_id 4 for calling a global function with example usage: sample_trials(space, num, seed, status, objective, params, exp_working_dir) and returns: new_trials