def _check_measurement(measurement, allowed_units):
    """
    Checks a measurement to ensure it's quantity is a number and its units are
    of allowed units.

    Parameters
    ----------
    measurement : str
    allowed_units : list of str
    """
    quantity, unit = measurement.split(":", 1)
    return (
        unit in allowed_units and
        all(i.isdigit() or i == "." for i in quantity)
    )