import math


def _is_valid_samplerate(hz):
    """Return True if sample rate is close to an integer, False otherwise."""

    closest_integer = round(hz, 0)

    if not math.isclose(hz, closest_integer, abs_tol=1e-6):
        return False
    else:
        return True