parameters: (input_tensors, red_f, un_op)
docstring: If len(input_tensors) > 1, apply red_f, else apply un_op.
docstring_summary: If len(input_tensors) > 1, apply red_f, else apply un_op.
docstring_tokens: If len ( input_tensors ) > 1 apply red_f else apply un_op .
function: 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
function_tokens: def _reduce_non_singleton ( input_tensors , red_f , 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