code: def __init__(
      self,
      prob_method: List[float] = None,
      prob_method_lookup: Mapping[
          Callable[[Tree], TreeMutation], float
      ] = None,
  ):
      if prob_method_lookup is not None:
          self.prob_method_lookup = prob_method_lookup
      else:
          if prob_method is None:
              prob_method = [0.5, 0.5]
          self.prob_method_lookup = {
              x[0]: x[1]
              for x in zip(
                  [
                      uniformly_sample_grow_mutation,
                      uniformly_sample_prune_mutation,
                  ],
                  prob_method,
              )
          }
      self.methods = list(self.prob_method_lookup.keys())
      self.method_sampler = DiscreteSampler(
          list(self.prob_method_lookup.keys()),
          list(self.prob_method_lookup.values()),
          cache_size=1000,
      )
  
file_path: imodels/imodels/experimental/bartpy/samplers/unconstrainedtree/proposer.py
imports: from operator import le, gt
  from typing import Callable, List, Mapping, Optional, Tuple
  import numpy
  from ...errors import NoSplittableVariableException, NoPrunableNodeException
  from ...mutation import TreeMutation, GrowMutation, PruneMutation
  from ...node import LeafNode, DecisionNode, split_node
  from ...samplers.scalar import DiscreteSampler
  from ...samplers.treemutation import TreeMutationProposer
  from ...split import SplitCondition
  from ...tree import Tree
label_desc: Use image node_id 1 to create a new UniformMutationProposer object from inherited base classes: TreeMutationProposer with example: obj = UniformMutationProposer(prob_method, prob_method_lookup)