def METHOD_NAME( state ):
    """return the given state int as a state string"""
    #return "0x%02x" % state # comment this out to get textual state form
    global State
    if 0 <= state <= IRUPDATE:
        return State[state]
    else:
        return "Unknown state 0x%02x" % state