def memory_test(used,total,percentage=25):
    """Tests the sensor used memory against the total memory size.
    @param used_memory -- the used memory of the sensor.
    @param total_memory -- the total memory of the sensor.
    @return -- a string flag
                "PASS" if the used memory is 25% or less of the total.
                "FAIL" if the used memory is greater than 25% of the total.
    """
    if used <= total*(percentage/100):
        flag = "PASS"
    else:
        flag = "FAIL"
    return flag