def _update_memory(key, cur, target, common_mem):
    mod_swap = {"G": "M", "g": "m"}
    cur_mem, orig_mod = _get_cur_mem(key, cur)
    if cur_mem >= common_mem * 1.5:
        return cur
    else:
        new_val = "%s%s" % (target, mod_swap.get(orig_mod, orig_mod))
        if key == "jvm_opts":
            out = cur
            out[-1] = "-Xmx%s" % new_val
        else:
            out = new_val
        return out

# ## Build docker images
Notifications will not be sent if the stockout is a product type does
dataset/ETHPy150Open chapmanb/bcbio-nextgen-vm/bcbiovm/docker/devel.py/_update_memory--crossover with--dataset/ETHPy150Open dimagi/commcare-hq/custom/ewsghana/tests/test_notifications.py/UrgentNonReportingNotificationTestCase.test_product_type_filter