def nonnegative_int(val):
    val = int(val)
    if val < 0:
        raise TypeError("must be a nonnegative integer")
    return val
dataset/ETHPy150Open dougalsutherland/py-sdm/sdm/utils.py/nonnegative_int/original