def get_memory_amount(builder, installProfile, is_mandatory):
    if "hardwareSettings" in builder and builder["hardwareSettings"] in "memory":
        installProfile.memorySize = builder["hardwareSettings"]["memory"]
        return installProfile
    else:
        if is_mandatory:
            printer.out("Error: no hardwareSettings part for builder [" + builder["type"] + "]", printer.ERROR)
            return 2
        else:
            return installProfile
dataset/ETHPy150Open usharesoft/hammr/src/hammr/utils/generate_utils.py/get_memory_amount/swapped operands of `in`