def sample_func(chunk, frac):
    n = max(math.ceil((len(chunk) * frac)), 1)
    return chunk.sample(n=n, replace=False, random_state=0)
def sample_func(chunk, frac):
    n = max(math.ceil((len(chunk) * frac)), 1)
    return chunk.sample(n=n, replace=False, random_state=0)