code: def testAttrValueToPyObjectError(self, pbtxt):
      proto = attr_value_pb2.AttrValue()
      text_format.Parse(pbtxt, proto)
      with self.assertRaises((TypeError, ValueError)):
          _op_def_util.SerializedAttrValueToPyObject(
              proto.SerializeToString()
          )
  
file_path: tensorflow/tensorflow/python/framework/op_def_util_test.py
imports: from absl.testing import parameterized
  import numpy
  from google.protobuf import text_format
  from tensorflow.core.framework import attr_value_pb2
  from tensorflow.core.framework import tensor_pb2
  from tensorflow.core.framework import types_pb2
  from tensorflow.python.framework import _op_def_util
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import test_util
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 4 for calling the OpDefUtilTest obj's underlying member method code with example usage: obj.testAttrValueToPyObjectError(pbtxt) without return types