code: def compute_fidelities(
      n_branching: int,
      low: numpy.ndarray | float,
      high: numpy.ndarray | float,
      base: float,
  ) -> list[float]:
      """Compute fidelities"""
      if base == 1:
          fidelities = numpy.linspace(
              low, high, num=n_branching + 1, endpoint=True
          )
      else:
          fidelities = numpy.logspace(
              numpy.log(low) / numpy.log(base),
              numpy.log(high) / numpy.log(base),
              n_branching + 1,
              base=base,
              endpoint=True,
          )
  
      return numpy.clip(fidelities, a_min=low, a_max=high).tolist()
  
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 2 for calling a global function with example usage: compute_fidelities(n_branching, low, high, base) and returns: numpy