code: def testDefaultFilling(self):
      context_features = [
          struct2tensor_parsing_utils.Feature(
              "ctx.bytes", tf.string, default_value=b"g", length=1
          ),
      ]
      example_features = [
          struct2tensor_parsing_utils.Feature(
              "example_float", tf.float32, default_value=-1.0, length=2
          ),
      ]
      decoder = struct2tensor_parsing_utils.ELWCDecoder(
          "test_decoder",
          context_features,
          example_features,
          size_feature_name=None,
          label_feature=None,
      )
  
      result = decoder.decode_record(tf.convert_to_tensor(_ELWCS))
      self.assertLen(
          result, len(context_features) + len(example_features)
      )
      for f in itertools.chain(context_features, example_features):
          self.assertIn(f.name, result)
          self.assertIsInstance(result[f.name], tf.RaggedTensor)
  
      expected = {
          "ctx.bytes": [[b"g"], [b"c"]],
          "example_float": [
              [[11.0, 12.0], [-1.0, -1.0]],
              [[14.0, 15.0]],
          ],
      }
      self.assertEqual(
          {k: v.to_list() for k, v in result.items()}, expected
      )
  
file_path: tfx/tfx/examples/ranking/struct2tensor_parsing_utils_test.py
imports: import itertools
  import unittest
  import tensorflow
  from google.protobuf import text_format
  from tensorflow_serving.apis import input_pb2
label_desc: Use image node_id 2 for calling the ELWCDecoderTest obj's underlying member method code with example usage: obj.testDefaultFilling() without return types