code: def self_attention_and_residual(
      feature, size, input_mask, name, maxlen
  ):
      query = L.fc(
          feature, size, name=name + "_query", num_flatten_dims=2
      )
      key = L.fc(feature, size, name=name + "_key", num_flatten_dims=2)
      value = L.fc(
          feature, size, name=name + "_value", num_flatten_dims=2
      )
      attention = L.softmax(
          L.matmul(query, key, transpose_y=True) + input_mask
      )
      output = L.matmul(attention, value)
      output = L.fc(
          output, size, name=name + "_model", num_flatten_dims=2
      )
      output = L.relu(output + feature)
      output = L.layer_norm(
          output, begin_norm_axis=2, name=name + "_ln"
      )
      return output
  
label_desc: Use image node_id 1 for calling a global function with example usage: self_attention_and_residual(feature, size, input_mask, name, maxlen) and returns: output