code: def positional_embedding(pos_seq, inv_freq, bsz=None):
      sinusoid_inp = tf.einsum("i,j->ij", pos_seq, inv_freq)
      pos_emb = tf.concat(
          [tf.sin(sinusoid_inp), tf.cos(sinusoid_inp)], -1
      )
      if bsz is not None:
          return tf.tile(pos_emb[:, None, :], [1, bsz, 1])
      else:
          return pos_emb[:, None, :]
  
file_path: delta/gcompiler/example/python/nlp_transformer/model.py
imports: import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: positional_embedding(pos_seq, inv_freq, bsz) and returns: tf, pos_emb