code: def testGetNodeMapBasic(self):
      meta_graph_def = meta_graph_pb2.MetaGraphDef()
      meta_graph_def.collection_def[
          "my_collection/%s" % encoding.KEY_SUFFIX
      ].bytes_list.value[:] = map(
          encoding.encode_key, ["alpha", "bravo", "charlie"]
      )
      meta_graph_def.collection_def[
          "my_collection/fruits"
      ].bytes_list.value[:] = [b"apple", b"banana", b"cherry"]
      expected = {
          "alpha": {"fruits": b"apple"},
          "bravo": {"fruits": b"banana"},
          "charlie": {"fruits": b"cherry"},
      }
      self.assertDictEqual(
          expected,
          graph_ref.get_node_map(
              meta_graph_def, "my_collection", ["fruits"]
          ),
      )
  
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 3 for calling the GraphRefTest obj's underlying member method code with example usage: obj.testGetNodeMapBasic() without return types