code: def testLastBatchMode(self):
      sr = 16000
      batch_size = 64
      for last_batch_mode in ("discard", "zeros", "same"):
          model = TensorflowPredictEffnetDiscogs(
              graphFilename=join(
                  testdata.models_dir,
                  "effnetdiscogs",
                  "effnetdiscogs-bs64-1.pb",
              ),
              lastBatchMode=last_batch_mode,
              batchSize=batch_size,
          )
  
          # It'd be nice to test other durations but we are limited by inference times,
          # especially in CPU.
          seconds = 150
          audio = numpy.ones((sr * seconds), dtype="float32")
          found = len(model(audio))
  
          if last_batch_mode == "discard":
              expected = (seconds // batch_size) * batch_size
          elif last_batch_mode == "zeros":
              expected = numpy.ceil(seconds / batch_size) * batch_size
          elif last_batch_mode == "same":
              expected = seconds
  
          self.assertEqual(found, expected)
  
imports: from essentia_test import *
label_desc: Use image node_id 4 for calling the TestTensorFlowPredictEffnetDiscogs obj's underlying member method code with example usage: obj.testLastBatchMode() without return types