class_docstr: Lineage node
  
  The lineage node is based on :py:class:`orion.core.utils.tree.TreeNode`. It provides
  additional methods to help represent lineages for PBT, in particular, ``fork``,
  ``set_jump``, ``get_true_ancestor`` and ``get_best_trial``.
  
  A lineage node can be connected to a parent and children, like a typical TreeNode, but
  also to ``jumps`` and a ``base``. The jumps and base represent the connection between nodes
  when PBT drops a trial and rather fork another one. In such case, the dropped trial
  will refer to the new trial (the forked one) with ``jumps`` (it can refer to many if
  the new trials crashed and required rollback) and the forked trial will refer to the
  dropped one with ``base`` (it can only refer one).
  
  Parameters
  ----------
  trial: ``orion.core.worker.trial.Trial``
      The trial to represent with the lineage node.
  parent: LineageNode, optional
      The parent node for this lineage node. Default: None, that is, no parent.
docstr: Return best trial on the path from root up to this node.
  
  The path followed is through `true` ancestors, that is, looking at
  base if the current node is the result of a fork, otherwise looking at the parent.
  
  Only leaf node trials may not be completed. If there is only one node in the tree
  and the node's trial is not completed, ``None`` is returned instead of a trial object.
  
  Returns
  -------
  ``None``
      Only one node in the tree and it is not completed.
  
  ``orion.core.worker.trial.Trial``
      Trial with best objective (lowest).
docstr_tok: ["Return","best","trial","on","the","path","from","root","up","to","this","node",".","The","path","followed","is","through","`","true","`","ancestors",",","that","is",",","looking","at","base","if","the","current","node","is","the","result","of","a","fork",",","otherwise","looking","at","the","parent",".","Only","leaf","node","trials","may","not","be","completed",".","If","there","is","only","one","node","in","the","tree","and","the","node","'s","trial","is","not","completed",",","``","None","``","is","returned","instead","of","a","trial","object",".","Returns","--","--","--","-","``","None","``","Only","one","node","in","the","tree","and","it","is","not","completed",".","``","orion.core.worker.trial.Trial","``","Trial","with","best","objective","(","lowest",")","."]
code: def get_best_trial(self) -> Trial | None:
      """Return best trial on the path from root up to this node.
  
      The path followed is through `true` ancestors, that is, looking at
      base if the current node is the result of a fork, otherwise looking at the parent.
  
      Only leaf node trials may not be completed. If there is only one node in the tree
      and the node's trial is not completed, ``None`` is returned instead of a trial object.
  
      Returns
      -------
      ``None``
          Only one node in the tree and it is not completed.
  
      ``orion.core.worker.trial.Trial``
          Trial with best objective (lowest).
  
      """
      parent_node = self.get_true_ancestor()
  
      if parent_node:
          parent_trial = parent_node.get_best_trial()
  
          if get_objective(parent_trial) <= get_objective(self.item):
              return parent_trial
  
      if self.item.status != "completed":
          return None
  
      return self.item
  
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 9 for calling the LineageNode obj's underlying member method code with example usage: obj.get_best_trial() and returns: self, None, parent_trial