code: def __init__(
      self,
      dimension: int,
      budget: tp.Optional[int] = None,
      random_state: tp.Optional[RandomState] = None,
  ) -> None:
      if random_state is None:
          random_state = np.random.RandomState(
              np.random.randint(2**32, dtype=np.uint32)
          )
      self.random_state = random_state
      self.dimension = dimension
      self.budget = budget
      self.index = 0
  
imports: import numpy
  from numpy.random import RandomState
  import nevergrad.common.typing
  from nevergrad.common.decorators import Registry
label_desc: Use image node_id 1 to create a new Sampler object  with example: obj = Sampler(dimension, budget, random_state)