code: def GetContentFromProto(obj, function_map):
      """Gets a specific field from a protocol buffer that matches the given class"""
      for cls, func in function_map.items():
          if type(obj) is cls:
              return func(obj)
  
imports: from caffe2.proto import caffe2_pb2
  from google.protobuf.message import DecodeError, Message
  from google.protobuf import text_format
  import sys
  import collections
  import copy
  import functools
  import numpy
label_desc: Use image node_id 7 for calling a global function with example usage: GetContentFromProto(obj, function_map) and returns: func