def state_name(n):
    ''' Helper to convert state number into state name using event types.
    '''
    if event_types in n:
        eventname = event_types[n]
        name = eventname.split('_')[2]
    else:
        name = "unknown"
    return name
dataset/ETHPy150Open coreemu/core/daemon/core/api/coreapi.py/state_name/swapped operands of `in`