code: def testEncodeDecodeDict(self):
      structure = dict(a=3, b=[7, 2.5])
      self.assertTrue(nested_structure_coder.can_encode(structure))
      encoded = nested_structure_coder.encode_structure(structure)
      expected = struct_pb2.StructuredValue()
      expected.dict_value.fields["a"].int64_value = 3
      list_value = expected.dict_value.fields["b"].list_value
      list_value.values.add().int64_value = 7
      list_value.values.add().float64_value = 2.5
      self.assertEqual(expected, encoded)
      decoded = nested_structure_coder.decode_proto(encoded)
      self.assertIsInstance(decoded["a"], int)
      self.assertEqual(structure, decoded)
  
imports: import collections
  import typing
  import warnings
  import numpy
  from google.protobuf import text_format
  from tensorflow.core.protobuf import struct_pb2
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import extension_type
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.framework import test_util
  from tensorflow.python.framework import type_spec
  from tensorflow.python.framework import type_spec_registry
  from tensorflow.python.ops.ragged import ragged_tensor
  from tensorflow.python.platform import test
  from tensorflow.python.saved_model import nested_structure_coder
  from tensorflow.python.types import internal
label_desc: Use image node_id 3 for calling the NestedStructureCoderTest obj's underlying member method code with example usage: obj.testEncodeDecodeDict() without return types