def METHOD_NAME(config):
    interval_msec = config[CONF_UPDATE_INTERVAL].total_milliseconds
    interval_hz = 1000.0 / interval_msec
    for datarate in sorted(HMC5883LDatarates.keys()):
        if float(datarate) >= interval_hz:
            return HMC5883LDatarates[datarate]
    return HMC5883LDatarates[75]