code: def _repack_list(sets, fn):
      """Repack list from [[a, b, c], [a', b', c'], ....]
      to [fn(a, a', ...), fn(b, b', ...), fn(c, c', ...)]
      where fn can be `tuple` or `list`
      Assume that all elements of input have the same length
      """
      output_list = []
      arg_list_len = len(sets[0])
      for i in range(arg_list_len):
          output_list.append(fn(input_set[i] for input_set in sets))
      return output_list
  
label_desc: Use image node_id 1 for calling a global function with example usage: _repack_list(sets, fn) and returns: output_list