code: def _create_mask(qlen, mlen, same_length=False):
      attn_mask = tf.ones([qlen, qlen])
      mask_u = tf.matrix_band_part(attn_mask, 0, -1)
      mask_dia = tf.matrix_band_part(attn_mask, 0, 0)
      attn_mask_pad = tf.zeros([qlen, mlen])
      ret = tf.concat([attn_mask_pad, mask_u - mask_dia], 1)
      if same_length:
          mask_l = tf.matrix_band_part(attn_mask, -1, 0)
          ret = tf.concat(
              [ret[:, :qlen] + mask_l - mask_dia, ret[:, qlen:]], 1
          )
      return ret
  
file_path: delta/gcompiler/example/python/nlp_transformer/model.py
imports: import tensorflow
label_desc: Use image node_id 10 for calling a global function with example usage: _create_mask(qlen, mlen, same_length) and returns: ret