def get_sampler(self):
    """Returns the exemplar sampler based on the config."""
    if self.sampler == "uniform":
      return functools.partial(
          sample_utils.uniform_sample, max_num_items=self.max_exemplars)
    elif self.sampler == "geometric":
      return functools.partial(
          sample_utils.geometric_sample,
          max_num_items=self.max_exemplars,
          sample_prob=self.sample_prob)
    else:
      raise ValueError(f"Unknown sampler: {self.sampler}")
Returns the exemplar sampler based on the config.
language/casper/augment/casper_converters.py