def METHOD_NAME(cal_field, instr_field):
    if isinstance(cal_field, (Parameter, FormalArgument)):
        if instr_field is None:
            raise CalibrationDoesntMatch()
        settings[cal_field] = instr_field
    elif cal_field != instr_field:
        raise CalibrationDoesntMatch()