code: def test_random(self):
      m, n = 1000, 20
      x = np.random.rand(m, n)
      x_original = x.copy()
      x_zero = np.where(x < 0.5)
      x_one = np.where(x >= 0.5)
  
      preproc = FeatureSqueezing(clip_values=(0, 1), bit_depth=1)
      x_squeezed, _ = preproc(x)
      self.assertTrue((x_squeezed[x_zero] == 0.0).all())
      self.assertTrue((x_squeezed[x_one] == 1.0).all())
  
      preproc = FeatureSqueezing(clip_values=(0, 1), bit_depth=2)
      x_squeezed, _ = preproc(x)
      self.assertFalse(
          np.logical_and(0.0 < x_squeezed, x_squeezed < 0.33).any()
      )
      self.assertFalse(
          np.logical_and(0.34 < x_squeezed, x_squeezed < 0.66).any()
      )
      self.assertFalse(
          np.logical_and(0.67 < x_squeezed, x_squeezed < 1.0).any()
      )
      # Check that x has not been modified by attack and classifier
      self.assertAlmostEqual(
          float(np.max(np.abs(x_original - x))), 0.0, delta=0.00001
      )
  
file_path: adversarial-robustness-toolbox/tests/defences/test_feature_squeezing.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import unittest
  import numpy
  from art.defences.preprocessor import FeatureSqueezing
  from tests.utils import master_seed
label_desc: Use image node_id 3 for calling the TestFeatureSqueezing obj's underlying member method code with example usage: obj.test_random() without return types