class_docstr: Test the hint to stub functionality.
class_docstr_tok: ["Test","the","hint","to","stub","functionality","."]
code: def testAggregate(self):
      with ops.Graph().as_default():
          a = array_ops.constant([3.0, 4.0])
          b = array_ops.constant([5.0, 6.0])
          hint = op_hint.OpHint("agg")
          a0, a1 = array_ops_stack.unstack(a)
          b0, b1 = array_ops_stack.unstack(b)
  
          a0 = hint.add_input(
              a0, tag="c", aggregate=op_hint.OpHint.AGGREGATE_STACK
          )
          b0 = hint.add_input(
              b0, tag="n", aggregate=op_hint.OpHint.AGGREGATE_STACK
          )
          a1 = hint.add_input(
              a1, tag="c", aggregate=op_hint.OpHint.AGGREGATE_STACK
          )
          b1 = hint.add_input(
              b1, tag="n", aggregate=op_hint.OpHint.AGGREGATE_STACK
          )
  
          c0 = math_ops.add(a0, b0, name="addleft")
          c1 = math_ops.add(a1, b1, name="addright")
          c0 = hint.add_output(
              c0, tag="out", aggregate=op_hint.OpHint.AGGREGATE_STACK
          )
          c1 = hint.add_output(
              c1, tag="out", aggregate=op_hint.OpHint.AGGREGATE_STACK
          )
  
          curr = array_ops_stack.stack([c0, c1])
          output = array_ops.identity(curr, name="FINAL_OUTPUT")
          with self.cached_session() as sess:
              stubbed_graphdef = op_hint.convert_op_hints_to_stubs(
                  graph_def=sess.graph_def
              )
              self.assertEqual(
                  self._getGraphOpTypes(
                      stubbed_graphdef,
                      output_nodes=[
                          op_hint._tensor_name_base(output.name)
                      ],
                  ),
                  set(["agg", "Const", "Identity"]),
              )
  
imports: from unittest import mock
  import numpy
  from tensorflow.lite.python import convert
  from tensorflow.lite.python import op_hint
  from tensorflow.lite.python.interpreter import Interpreter
  from tensorflow.lite.python.metrics import converter_error_data_pb2
  from tensorflow.lite.python.metrics.wrapper import metrics_wrapper
  from tensorflow.lite.toco import toco_flags_pb2
  from tensorflow.python.client import session
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.framework.graph_util_impl import _bfs_for_reachable_nodes
  from tensorflow.python.framework.graph_util_impl import _extract_graph_summary
  from tensorflow.python.framework.graph_util_impl import _node_name
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import math_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 11 for calling the ConvertTestOpHint obj's underlying member method code with example usage: obj.testAggregate() without return types