code: def test_perturb_cat(self):
      explore = PerturbExplore()
      rng = RNGStub()
      rng.randint = lambda low, high=None, size=None: [1] if size else 1
  
      dim = Categorical("name", ["one", "two", 3, 4.0])
      assert explore.perturb_cat(rng, "whatever", dim) in dim
  
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 11 for calling the TestPerturb obj's underlying member method code with example usage: obj.test_perturb_cat() without return types