code: def _attr_with_shape(dims, unknown_rank=0):
      attr = attr_value.AttrValue()
      for dim_size, dim_name in dims:
          tf_dim = tensor_shape.TensorShapeProto.Dim()
          tf_dim.size = dim_size
          tf_dim.name = dim_name
          attr.shape.dim.append(tf_dim)
      attr.shape.unknown_rank = unknown_rank
      return attr
  
file_path: turicreate/src/external/coremltools_wrap/coremltools/coremltools/converters/mil/frontend/tensorflow/test/test_parse.py
imports: import unittest
  import pytest
  from tensorflow.core.framework import attr_value_pb2
  from tensorflow.core.framework import tensor_shape_pb2
  from tensorflow.core.framework import types_pb2
  from coremltools.converters.mil.mil import types
  import coremltools.converters.mil.frontend.tensorflow.parse
label_desc: Use image node_id 3 for calling the TestParse obj's underlying member method code with example usage: obj._attr_with_shape(dims, unknown_rank) and returns: attr