code: def _reduce_non_singleton(input_tensors, red_f, un_op):
      """If len(input_tensors) > 1, apply red_f, else apply un_op."""
      if len(input_tensors) > 1:
          return red_f(input_tensors)
      else:
          if not un_op:
              return input_tensors
          output_tensors = []
          for t in input_tensors:
              with ops.colocate_with(t):
                  output_tensors.append(un_op(t))
          return output_tensors
  
imports: import collections
  import math
  from tensorflow.python.framework import device
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nccl_ops
label_desc: Use image node_id 20 for calling a global function with example usage: _reduce_non_singleton(input_tensors, red_f, un_op) and returns: red_f, output_tensors, input_tensors