code: def get_n_completed_trials(space, n):
      trials = space.sample(n)
      for i, trial in enumerate(trials):
          trial.results.append(
              trial.Result(name="objective", value=i, type="objective")
          )
          trial.status = "completed"
  
      return trials
  
file_path: orion/tests/unittests/algo/mofa/test_analysis.py
imports: import itertools
  import numpy
  import pandas
  import pytest
  from orion.algo.mofa.mofa import MOFA, get_factorial_importance_analysis, get_factorial_performance_analysis, select_new_region_of_interest
  from orion.algo.mofa.transformer import Transformer
  from orion.core.io.space_builder import SpaceBuilder
  from orion.core.worker.transformer import build_required_space
label_desc: Use image node_id 2 for calling a global function with example usage: get_n_completed_trials(space, n) and returns: trials