code: def test_random_targets_one_hot(self):
      # Test utils.random_targets with one-hot encoded labels as the input
      gt = np.asarray(
          [
              [0, 0, 1, 0, 0],
              [1, 0, 0, 0, 0],
              [0, 0, 0, 1, 0],
              [1, 0, 0, 0, 0],
          ]
      )
      gt_labels = np.argmax(gt, axis=1)
      rt = utils.random_targets(gt, 5)
  
      # Make sure random_targets returns a one-hot encoded labels
      self.assertTrue(len(rt.shape) == 2)
      rt_labels = np.argmax(rt, axis=1)
  
      # Make sure all labels are different from the correct labels
      self.assertTrue(np.all(rt_labels != gt_labels))
  
file_path: cleverhans/cleverhans_v3.1.0/tests_tf/test_utils.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import unittest
  import numpy
  from cleverhans import utils
  from cleverhans.utils_keras import cnn_model
  from cleverhans.utils_keras import KerasModelWrapper
label_desc: Use image node_id 3 for calling the TestUtils obj's underlying member method code with example usage: obj.test_random_targets_one_hot() without return types