def get_outputbrakevalue(brake):

    """ Get the output brake value correposnding to the setting word """

    brakevalue = {
        'off': 0,
        'on': 1
    }
    brake = brake.lower()
    if type(brake) is not str:
        raise NameError('Invalid brake value.')
    if brake not in list(brakevalue.keys()):
        raise NameError('Invalid brake value.')
    return brakevalue[brake]