code: def parse_node_attr(node_proto):
      attrs = {}
      attr_proto = node_proto.attribute
  
      for attr in attr_proto:
          for field in ["f", "i", "s"]:
              if attr.HasField(field):
                  attrs[attr.name] = getattr(attr, field)
  
                  # Needed for supporting python version > 3.5
                  if isinstance(attrs[attr.name], bytes):
                      attrs[attr.name] = attrs[attr.name].decode(
                          encoding="utf-8"
                      )
  
          for field in ["floats", "ints", "strings"]:
              if list(getattr(attr, field)):
                  invalidInputError(
                      attr.name not in attrs,
                      "Only one type of attr is allowed",
                  )
                  attrs[attr.name] = tuple(getattr(attr, field))
  
          for field in ["t", "g"]:
              if attr.HasField(field):
                  attrs[attr.name] = getattr(attr, field)
          for field in ["tensors", "graphs"]:
              if list(getattr(attr, field)):
                  invalidInputError(False, "Not implement yet")
          if attr.name not in attrs:
              invalidInputError(
                  False, "Cannot parse attribute: \n{}\n.".format(attr)
              )
  
      return attrs
  
imports: import math
  import numpy
  from bigdl.dllib.utils.log4Error import *
label_desc: Use image node_id 2 for calling a global function with example usage: parse_node_attr(node_proto) and returns: attrs