code: def test_all_below_threshold_works(self):
      # Tests that encoding does not blow up with all-below-threshold input. In
      # this case, both of the encoded values will be empty arrays.
      stage = misc.SplitBySmallValueEncodingStage(threshold=0.1)
      x = tf.random.uniform([50], minval=-0.01, maxval=0.01)
      encode_params, decode_params = stage.get_params()
      encoded_x, decoded_x = self.encode_decode_x(
          stage, x, encode_params, decode_params
      )
      test_data = test_utils.TestData(x, encoded_x, decoded_x)
      test_data = self.evaluate_test_data(test_data)
  
      expected_encoded_indices = np.array([], dtype=np.int32).reshape(
          [0]
      )
      self.assertAllEqual(
          test_data.encoded_x[stage.ENCODED_VALUES_KEY], []
      )
      self.assertAllEqual(
          test_data.encoded_x[stage.ENCODED_INDICES_KEY],
          expected_encoded_indices,
      )
      self.assertAllEqual(
          test_data.decoded_x,
          np.zeros([50], dtype=x.dtype.as_numpy_dtype),
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import itertools
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.stages.research import misc
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.testing import test_utils
label_desc: Use image node_id 8 for calling the SplitBySmallValueEncodingStageTest obj's underlying member method code with example usage: obj.test_all_below_threshold_works() without return types