def METHOD_NAME(process):
    ''' Generate the code for a complete process (AST Top level) '''
    # In case model has nested states, flatten everything
    Helper.flatten(process)
    # Make an mapping {input: {state: transition...}} in order to easily
    # generate the lookup tables for the state machine runtime
    mapping = Helper.map_input_state(process)