code: def testStructureFromValueEquality(
      self, value1_fn, value2_fn, not_equal_value_fns
  ):
      # pylint: disable=g-generic-assert
      not_equal_value_fns = not_equal_value_fns._obj
      s1 = structure.type_spec_from_value(value1_fn())
      s2 = structure.type_spec_from_value(value2_fn())
      self.assertEqual(s1, s1)  # check __eq__ operator.
      self.assertEqual(s1, s2)  # check __eq__ operator.
      self.assertFalse(s1 != s1)  # check __ne__ operator.
      self.assertFalse(s1 != s2)  # check __ne__ operator.
      for c1, c2 in zip(nest.flatten(s1), nest.flatten(s2)):
          self.assertEqual(hash(c1), hash(c1))
          self.assertEqual(hash(c1), hash(c2))
      for value_fn in not_equal_value_fns:
          s3 = structure.type_spec_from_value(value_fn())
          self.assertNotEqual(s1, s3)  # check __ne__ operator.
          self.assertNotEqual(s2, s3)  # check __ne__ operator.
          self.assertFalse(s1 == s3)  # check __eq_ operator.
          self.assertFalse(s2 == s3)
  
imports: import collections
  import dataclasses
  import functools
  from absl.testing import parameterized
  import numpy
  import wrapt
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.util import nest
  from tensorflow.python.data.util import structure
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import tensor_array_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.ops.ragged import ragged_factory_ops
  from tensorflow.python.ops.ragged import ragged_tensor
  from tensorflow.python.ops.ragged import ragged_tensor_value
  from tensorflow.python.platform import test
  from tensorflow.python.util.compat import collections_abc
label_desc: Use image node_id 3 for calling the StructureTest obj's underlying member method code with example usage: obj.testStructureFromValueEquality(value1_fn, value2_fn, not_equal_value_fns) without return types