code: def test_float_types(self):
      # Tests that both float32 and float64 type work correctly.
      stage = self.default_encoding_stage()
      test_data = self.run_one_to_many_encode_decode(
          stage, lambda: tf.cast(self.default_input(), tf.float32)
      )
      self.assertAllClose(test_data.x, test_data.decoded_x)
      self.assertEqual(np.float32, test_data.decoded_x.dtype)
  
      test_data = self.run_one_to_many_encode_decode(
          stage, lambda: tf.cast(self.default_input(), tf.float64)
      )
      self.assertAllClose(test_data.x, test_data.decoded_x)
      self.assertEqual(np.float64, test_data.decoded_x.dtype)
  
imports: import itertools
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.stages import stages_impl
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.testing import test_utils
label_desc: Use image node_id 7 for calling the BitpackingEncodingStageTest obj's underlying member method code with example usage: obj.test_float_types() without return types