def status_map(state):
    """Return a numeric value in place of the string value for state"""
    if state == 'green':
        retval = 0
    elif state == 'yellow':
        retval = 1
    elif state == 'red':
        retval = 2
    else:
        retval = 3 # fail
    return retval