class_docstr: Test the hint to stub functionality.
class_docstr_tok: ["Test","the","hint","to","stub","functionality","."]
docstr: Returns used op types in `graphdef` reachable from `output_nodes`.
  
  This is used to check that after the stub transformation the expected
  nodes are there.
  
  NOTE: this is not a exact test that the graph is the correct output, but
    it balances compact expressibility of test with sanity checking.
  
  Args:
    graphdef: TensorFlow proto graphdef.
    output_nodes: A list of output node names that we need to reach.
  
  Returns:
    A set of node types reachable from `output_nodes`.
code: def _getGraphOpTypes(self, graphdef, output_nodes):
      """Returns used op types in `graphdef` reachable from `output_nodes`.
  
      This is used to check that after the stub transformation the expected
      nodes are there.
  
      NOTE: this is not a exact test that the graph is the correct output, but
        it balances compact expressibility of test with sanity checking.
  
      Args:
        graphdef: TensorFlow proto graphdef.
        output_nodes: A list of output node names that we need to reach.
  
      Returns:
        A set of node types reachable from `output_nodes`.
      """
      name_to_input_name, name_to_node, _ = _extract_graph_summary(
          graphdef
      )
      # Find all nodes that are needed by the outputs
      used_node_names = _bfs_for_reachable_nodes(
          output_nodes, name_to_input_name
      )
      return set(
          [name_to_node[node_name].op for node_name in used_node_names]
      )
  
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 1 for calling the ConvertTestOpHint obj's underlying member method code with example usage: obj._getGraphOpTypes(graphdef, output_nodes) and returns: set