code: def signature(perm):
      i = perm.index(0)
      sig_1 = perm[i:] + perm[:i]
      sig_2 = sig_1[0:1] + sig_1[1:][::-1]
  
      if sig_1[1] < sig_2[1]:
          sig = sig_1
      else:
          sig = sig_2
  
      return tuple(sig)
  
label_desc: Use image node_id 2 for calling a global function with example usage: signature(perm) and returns: tuple