code: def _UnpackIfSingleton(res):
      if isinstance(res, (list, tuple)) and len(res) == 1:
          return res[0]
      else:
          return res
  
imports: from tensorflow.python.eager import context
  from tensorflow.python.eager.polymorphic_function import eager_function_run
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import indexed_slices
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import cond_v2
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import control_flow_util
  from tensorflow.python.ops import math_ops
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.types import core
  from tensorflow.python.util import deprecation
  from tensorflow.python.util import dispatch
  from tensorflow.python.util import nest
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 3 for calling a global function with example usage: _UnpackIfSingleton(res) and returns: res, res