code: def _get_best_trial(experiment: ExperimentClient) -> Trial:
      trials: list[Trial] = experiment.fetch_trials_by_status(
          status="completed"
      )
      return min(trials, key=_get_objective)
  
imports: from __future__ import annotations
  import functools
  import random
  from pathlib import Path
  from typing import Callable
  import numpy
  import pytest
  from typing_extensions import ParamSpec
  from orion.algo.base import BaseAlgorithm
  from orion.algo.space import Space
  from orion.algo.tpe import TPE
  from orion.client import build_experiment, workon
  from orion.client.experiment import ExperimentClient
  from orion.core.io.space_builder import SpaceBuilder
  from orion.core.worker.trial import Trial
  from orion.core.worker.warm_start.knowledge_base import KnowledgeBase
  from orion.storage.base import BaseStorageProtocol, setup_storage
label_desc: Use image node_id 8 for calling a global function with example usage: _get_best_trial(experiment) and returns: min