code: def fetch_attr_value(attr):
      """Fetch valid value from AttrValue proto."""
      field = attr.WhichOneof("value")
      val = getattr(attr, field) if field else None
      return val.decode("utf-8") if isinstance(val, bytes) else val
  
imports: import six
  from six import string_types
  from mmdnn.conversion.caffe.errors import ConversionError
  from mmdnn.conversion.common.IR.graph_pb2 import GraphDef, NodeDef, TensorShape
  from mmdnn.conversion.caffe.utils import get_real_name
label_desc: Use image node_id 2 for calling a global function with example usage: fetch_attr_value(attr) and returns: unknown