class_docstr: An interface for handling random state locally, currently based on a class variable `R`,
  which is an instance of `np.random.RandomState`.
  This class introduces a randomized flag `_do_transform`, is mainly for randomized data augmentation transforms.
  For example:
  
  .. code-block:: python
  
      from monai.transforms import RandomizableTransform
  
      class RandShiftIntensity100(RandomizableTransform):
          def randomize(self):
              super().randomize(None)
              self._offset = self.R.uniform(low=0, high=100)
  
          def __call__(self, img):
              self.randomize()
              if not self._do_transform:
                  return img
              return img + self._offset
  
      transform = RandShiftIntensity()
      transform.set_random_state(seed=0)
      print(transform(10))
class_docstr_tok: ["An","interface","for","handling","random","state","locally",",","currently","based","on","a","class","variable","`","R","`",",","which","is","an","instance","of","`","np.random.RandomState","`",".","This","class","introduces","a","randomized","flag","`","_do_transform","`",",","is","mainly","for","randomized","data","augmentation","transforms",".","For","example",":","..","code-block",":",":","python","from","monai.transforms","import","RandomizableTransform","class","RandShiftIntensity100","(","RandomizableTransform",")",":","def","randomize","(","self",")",":","super","(",")",".randomize","(","None",")","self._offset","=","self.R.uniform","(","low=0",",","high=100",")","def","__call__","(","self",",","img",")",":","self.randomize","(",")","if","not","self._do_transform",":","return","img","return","img","+","self._offset","transform","=","RandShiftIntensity","(",")","transform.set_random_state","(","seed=0",")","print","(","transform","(","10",")",")"]
code: def __init__(self, prob: float = 1.0, do_transform: bool = True):
      self._do_transform = do_transform
      self.prob = min(max(prob, 0.0), 1.0)
  
imports: from __future__ import annotations
  import logging
  from abc import ABC, abstractmethod
  from collections.abc import Callable, Generator, Hashable, Iterable, Mapping
  from typing import Any, TypeVar
  import numpy
  import torch
  from monai import config, transforms
  from monai.config import KeysCollection
  from monai.data.meta_tensor import MetaTensor
  from monai.transforms.traits import LazyTrait, RandomizableTrait, ThreadUnsafe
  from monai.utils import MAX_SEED, ensure_tuple, first
  from monai.utils.enums import TransformBackends
  from monai.utils.misc import MONAIEnvVars
label_desc: Use image node_id 1 to create a new RandomizableTransform object from inherited base classes: Randomizable, Transform with example: obj = RandomizableTransform(prob, do_transform)