code: def get_objective(trial: Trial) -> float:
      """Retrieve the objective value from a trial or returns inf"""
      if trial.objective and trial.objective.value is not None:
          return trial.objective.value
  
      return float("inf")
  
imports: from __future__ import annotations
  import copy
  import logging
  import time
  from typing import Any, ClassVar, Iterable, Sequence
  import numpy
  from orion.algo.base import BaseAlgorithm
  from orion.algo.pbt.exploit import exploit_factory
  from orion.algo.pbt.explore import explore_factory
  from orion.algo.random import Random
  from orion.algo.space import Fidelity, Space
  from orion.core.utils.flatten import flatten
  from orion.core.utils.tree import TreeNode
  from orion.core.worker.transformer import TransformedDimension
  from orion.core.worker.trial import Trial
label_desc: Use image node_id 1 for calling a global function with example usage: get_objective(trial) and returns: float, trial