code: def test_fidelity_upgrades(self, space: Space):
      pbt = _create_algo(space).unwrap(PBT)
      fidelities = compute_fidelities(9, 2, 2**10, 2)
      assert pbt.fidelity_upgrades.keys() == fidelities[:-1]
      assert pbt.fidelity_upgrades.values() == fidelities[1:]
  
imports: from __future__ import annotations
  import functools
  import logging
  from typing import ClassVar
  import numpy
  import pytest
  from base import ExploitStub, ExploreStub, sample_trials
  from pytest_mock import MockerFixture
  from orion.algo.pbt.pbt import PBT, compute_fidelities
  from orion.algo.space import Space
  from orion.core.worker.primary_algo import SpaceTransform, create_algo
  from orion.core.worker.transformer import ReshapedSpace, TransformedSpace
  from orion.core.worker.trial import Trial
  from orion.testing.algo import BaseAlgoTests, TestPhase
label_desc: Use image node_id 3 for calling the TestComputeFidelities obj's underlying member method code with example usage: obj.test_fidelity_upgrades(space) without return types