class_docstr: Base class for testing proto decoding ops.
code: def testPacked(self, case):
      # Now try with the packed serialization.
      #
      # We test the packed representations by loading the same test case using
      # PackedTestValue instead of TestValue. To do this we rely on the text
      # format being the same for packed and unpacked fields, and reparse the
      # test message using the packed version of the proto.
      packed_batch = [
          # Note: float_format='.17g' is necessary to ensure preservation of
          # doubles and floats in text format.
          text_format.Parse(
              text_format.MessageToString(value, float_format=".17g"),
              test_example_pb2.PackedTestValue(),
          ).SerializeToString()
          for value in case.values
      ]
  
      self._runDecodeProtoTests(
          case.fields,
          case.sizes,
          list(case.shapes),
          packed_batch,
          "tensorflow.contrib.proto.PackedTestValue",
          "binary",
          sanitize=False,
      )
  
imports: import itertools
  from absl.testing import parameterized
  import numpy
  from google.protobuf import text_format
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.kernel_tests.proto import proto_op_test_base
  from tensorflow.python.kernel_tests.proto import test_example_pb2
label_desc: Use image node_id 7 for calling the DecodeProtoOpTestBase obj's underlying member method code with example usage: obj.testPacked(case) without return types