code: def positional_encoding(max_len, embedding_size):
      angle_rads = get_angles(
          np.arange(max_len)[:, np.newaxis],
          np.arange(embedding_size)[np.newaxis, :],
          embedding_size,
      )
  
      angle_rads[:, 0::2] = np.sin(angle_rads[:, 0::2])
      angle_rads[:, 1::2] = np.cos(angle_rads[:, 1::2])
      pos_encoding = angle_rads[np.newaxis, ...]
      return tf.cast(pos_encoding, dtype=tf.float32)
  
imports: import numpy
  import tensorflow
label_desc: Use image node_id 2 for calling a global function with example usage: positional_encoding(max_len, embedding_size) and returns: tf