def METHOD_NAME(
    self,
    df: pd.DataFrame,
    batch_spec: BatchSpec,
) -> pd.DataFrame:
    """Take the mod of named column, and only keep rows that match the given value.
    Args:
        df: dataframe to sample
        batch_spec: should contain keys `column_name`, `mod` and `value`
    Returns:
        Sampled dataframe
    Raises:
        SamplerError
    """
    self.verify_batch_spec_sampling_kwargs_exists(batch_spec)
    self.verify_batch_spec_sampling_kwargs_key_exists("column_name", batch_spec)
    self.verify_batch_spec_sampling_kwargs_key_exists("mod", batch_spec)
    self.verify_batch_spec_sampling_kwargs_key_exists("value", batch_spec)
    column_name: str = self.get_sampling_kwargs_value_or_default(
        batch_spec, "column_name"
    )
    mod: int = self.get_sampling_kwargs_value_or_default(batch_spec, "mod")
    value: int = self.get_sampling_kwargs_value_or_default(batch_spec, "value")
    return df[df[column_name].map(lambda x: x % mod == value)]