def METHOD_NAME(self, *, fraction: typing.Optional[float] = None, num: typing.Optional[int] = None, seed=None):
    if fraction is not None:
        return Table(self._rp.METHOD_NAME(fraction=fraction, seed=seed))
    if num is not None:
        total = self._rp.count()
        if num > total:
            raise ValueError(f"not enough data to sample, own {total} but required {num}")
        frac = num / float(total)
        while True:
            sampled_table = self._rp.METHOD_NAME(fraction=frac, seed=seed)
            sampled_count = sampled_table.count()
            if sampled_count < num:
                frac *= 1.1
            else:
                break
        if sampled_count > num:
            drops = sampled_table.take(sampled_count - num)
            for k, v in drops:
                sampled_table.delete(k)
        return Table(sampled_table)
    raise ValueError(f"exactly one of `fraction` or `num` required, fraction={fraction}, num={num}")