code: def test_resample_probability(self, space):
      explore = ResampleExplore(probability=0.5)
  
      rng = RNGStub()
      rng.randint = lambda low, high, size: [1]
      rng.random = lambda: 0.5
  
      params = {"x": 1.0, "y": 2, "z": 0, "f": 10}
  
      assert explore(rng, space, params) is params
  
      rng.random = lambda: 0.4
  
      assert explore(rng, space, params) is not params
  
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 TestResample obj's underlying member method code with example usage: obj.test_resample_probability(space) without return types