code: def test_least_likely_class(self):
      class DummyClassifier:
          @property
          def nb_classes(self):
              return 4
  
          def predict(self, x):
              fake_preds = [0.1, 0.2, 0.05, 0.65]
              return np.array([fake_preds] * x.shape[0])
  
      batch_size = 5
      x = np.random.rand(batch_size, 10, 10, 1)
      classifier = DummyClassifier()
      predictions = least_likely_class(x, classifier)
      self.assertEqual(
          predictions.shape, (batch_size, classifier.nb_classes)
      )
  
      expected_predictions = np.array([[0, 0, 1, 0]] * batch_size)
      self.assertTrue((predictions == expected_predictions).all())
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import unittest
  import numpy
  import tensorflow
  from art.utils import projection, random_sphere, uniform_sample_from_sphere_or_ball, to_categorical, least_likely_class
  from art.utils import load_dataset, load_iris, load_mnist, load_nursery, load_cifar10
  from art.utils import second_most_likely_class, random_targets, get_label_conf, get_labels_np_array, preprocess
  from art.utils import compute_success_array, compute_success, check_and_transform_label_format
  from art.utils import segment_by_class, performance_diff
  from art.utils import is_probability
  from tests.utils import master_seed
label_desc: Use image node_id 14 for calling the TestUtils obj's underlying member method code with example usage: obj.test_least_likely_class() and returns: int, np