code: def scaled_exp(field, c):
      """
      This function applies $exp(x / c)$ for input $x$, which is required by *Scaled Dot-Product Attention* mentioned in the paper.
      """
  
      def func(edges):
          return {field: th.exp((edges.data[field] / c).clamp(-10, 10))}
  
      return func
  
label_desc: Use image node_id 2 for calling a global function with example usage: scaled_exp(field, c) and returns: func, dict