code: def parse_attr(attr):
      if attr.HasField("s"):
          return parse_string(attr.s)
      elif attr.HasField("i"):
          return attr.i
      elif attr.HasField("f"):
          return attr.f
      elif attr.HasField("b"):
          return attr.b
      elif attr.HasField("type"):
          return parse_type(attr.type)
      elif attr.HasField("shape"):
          return parse_shape(attr.shape)
      elif attr.HasField("tensor"):
          return parse_tensor(attr.tensor)
      elif attr.HasField("list"):
          return parse_list(attr.list)
      elif attr.HasField("func"):
          return parse_func(attr.func)
      elif attr.HasField("placeholder"):
          raise NotImplementedError("placeholder not yet implemented")
      raise ValueError("unintelligible TFNode attributes")
  
file_path: turicreate/src/external/coremltools_wrap/coremltools/coremltools/converters/mil/frontend/tensorflow/parse.py
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  from coremltools.converters.mil.mil import types
  from tensorflow.core.framework.types_pb2 import DataType
  from tensorflow.python.framework.dtypes import _TF_TO_NP
  import logging
  import numpy
label_desc: Use image node_id 7 for calling a global function with example usage: parse_attr(attr) and returns: parse_string, attr, attr, attr, parse_type, parse_shape, parse_tensor, parse_list, parse_func