code: def testIfWithFunctionComposite(self):
      signature = [tensor_spec.TensorSpec([], dtypes.float32)]
  
      @def_function.function(input_signature=signature)
      def Then(x):
          return sparse_tensor.SparseTensor([[0]], [x + 1], [1])
  
      @def_function.function(input_signature=signature)
      def Else(x):
          return sparse_tensor.SparseTensor([[0]], [x - 1], [1])
  
      inputs = [10.0]
      then_cf = Then.get_concrete_function()
      else_cf = Else.get_concrete_function()
      result = functional_ops.If(False, inputs, then_cf, else_cf)
      self.assertIsInstance(result, sparse_tensor.SparseTensor)
      self.assertAllEqual([9.0], result.values)
  
file_path: tensorflow/tensorflow/python/ops/functional_ops_test.py
imports: from tensorflow.python.eager import def_function
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import function
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.ops import functional_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 3 for calling the FunctionalOpsTest obj's underlying member method code with example usage: obj.testIfWithFunctionComposite() and returns: sparse_tensor, sparse_tensor