code: def TransformerCellTypeNLP(
      output=None,
      pos_emb=None,
      r_w_bias=None,
      r_r_bias=None,
      attn_mask=None,
      mems=None,
      d_model=256,
      n_head=6,
      d_head=64,
      dropout=0.0,
      dropatt=0.0,
      is_training=False,
      initializer=None,
      index=0,
      d_inner=1024,
  ):
      with tf.compat.v1.variable_scope("layer_{}".format(index)):
          output = rel_multihead_attn(
              w=output,
              r=pos_emb,
              r_w_bias=r_w_bias,
              r_r_bias=r_r_bias,
              attn_mask=attn_mask,
              mems=mems,  # [index],
              d_model=d_model,
              n_head=n_head,
              d_head=d_head,
              dropout=dropout,
              dropatt=dropatt,
              is_training=is_training,
              kernel_initializer=initializer,
              index=index,
          )
      output = positionwise_FF(
          inp=output,
          d_model=d_model,
          d_inner=d_inner,
          dropout=dropout,
          kernel_initializer=initializer,
          is_training=is_training,
      )
      return output
  
label_desc: Use image node_id 1 for calling a global function with example usage: TransformerCellTypeNLP(output, pos_emb, r_w_bias, r_r_bias, attn_mask, mems, d_model, n_head, d_head, dropout, dropatt, is_training, initializer, index, d_inner) and returns: output