code: def create_model(vocab_size, rlayer_type):
      """
      Create LSTM/GRU model for bAbI dataset.
  
      Args:
          vocab_size (int) : String of bAbI data.
          rlayer_type (string) : Type of recurrent layer to use (gru or lstm).
  
      Returns:
          Model : Model of the created network
      """
      # recurrent layer parameters (default gru)
      rlayer_obj = GRU if rlayer_type == "gru" else LSTM
      rlayer_params = dict(
          output_size=100,
          reset_cells=True,
          init=GlorotUniform(),
          init_inner=Orthonormal(0.5),
          activation=Tanh(),
          gate_activation=Logistic(),
      )
  
      # if using lstm, swap the activation functions
      if rlayer_type == "lstm":
          rlayer_params.update(
              dict(activation=Logistic(), gate_activation=Tanh())
          )
  
      # lookup layer parameters
      lookup_params = dict(
          vocab_size=vocab_size,
          embedding_dim=50,
          init=Uniform(-0.05, 0.05),
      )
  
      # Model construction
      story_path = [
          LookupTable(**lookup_params),
          rlayer_obj(**rlayer_params),
      ]
      query_path = [
          LookupTable(**lookup_params),
          rlayer_obj(**rlayer_params),
      ]
  
      layers = [
          MergeMultistream(
              layers=[story_path, query_path], merge="stack"
          ),
          Affine(
              vocab_size, init=GlorotUniform(), activation=Softmax()
          ),
      ]
  
      return Model(layers=layers)
  
imports: from neon.data import BABI
  from neon.initializers import GlorotUniform, Uniform, Orthonormal
  from neon.layers import Affine, GRU, LookupTable, MergeMultistream, LSTM
  from neon.models import Model
  from neon.transforms import Logistic, Softmax, Tanh
label_desc: Use image node_id 2 for calling a global function with example usage: create_model(vocab_size, rlayer_type) and returns: Model