code: def testGetNodeInGraph(self):
      g = tf.Graph()
      with g.as_default():
          apple = tf.constant(1.0)
  
          meta_graph_def = meta_graph_pb2.MetaGraphDef()
          meta_graph_def.collection_def[
              "fruit_node"
          ].any_list.value.extend([encoding.encode_tensor_node(apple)])
  
          self.assertEqual(
              apple,
              graph_ref.get_node_in_graph(
                  meta_graph_def, "fruit_node", g
              ),
          )
  
file_path: model-analysis/tensorflow_model_analysis/eval_saved_model/graph_ref_test.py
imports: import tensorflow
  from tensorflow_model_analysis.eval_saved_model import encoding
  from tensorflow_model_analysis.eval_saved_model import graph_ref
  from tensorflow.core.protobuf import meta_graph_pb2
label_desc: Use image node_id 7 for calling the GraphRefTest obj's underlying member method code with example usage: obj.testGetNodeInGraph() without return types