def METHOD_NAME(cls, mode):
    if mode == 'reference':
        return 0b01
    elif mode == 'measure':
        return 0b10
    else:
        raise ValueError('Trying to set warm amplifier board switch to '
                         'invalid mode: {}'.format(mode))