code: def test_perturb_real_factor(self, factor):
      explore = PerturbExplore(factor=factor)
  
      rng = RNGStub()
      rng.random = lambda: 1.0
  
      assert explore.perturb_real(rng, 1.0, (0.1, 2.0)) == factor
  
      rng.random = lambda: 0.0
  
      assert explore.perturb_real(rng, 1.0, (0.1, 2.0)) == 1.0 / factor
  
imports: import numpy
  import pytest
  from base import RNGStub, TrialStub
  from orion.algo.pbt.explore import PerturbExplore, PipelineExplore, ResampleExplore
  from orion.algo.space import Categorical, Dimension
  from orion.core.utils.flatten import flatten
label_desc: Use image node_id 1 for calling the TestPerturb obj's underlying member method code with example usage: obj.test_perturb_real_factor(factor) without return types