code: def testOutputShapes(self):
      # Test that the outputs shapes correspond to the expected values.
  
      frame_size = 1
      test_lens = (1, 2, 3)
      for accumulate in (True, False):
          for n_batches in test_lens:
              for batch_size in test_lens:
                  for patch_size in test_lens:
                      if accumulate:
                          # With batchSize = -1, the algorithm should return a single batch with as
                          # many patches as possible.
                          shape = [-1, 1, patch_size, frame_size]
                          expected_n_batches = 1
                          expected_batch_shape = [
                              n_batches * batch_size,
                              1,
                              patch_size,
                              frame_size,
                          ]
                      else:
                          # With a fixed batch size the algorithm should return `n_batches` with a
                          # fixed batch size.
                          shape = [
                              batch_size,
                              1,
                              patch_size,
                              frame_size,
                          ]
                          expected_batch_shape = [
                              batch_size,
                              1,
                              patch_size,
                              frame_size,
                          ]
                          expected_n_batches = n_batches
  
                      n_samples = (
                          n_batches
                          * batch_size
                          * patch_size
                          * frame_size
                      )
                      params = {
                          "shape": shape,
                          "lastPatchMode": "discard",
                          "lastBatchMode": "discard",
                      }
  
                      batches = self.streamingPipeline(
                          n_samples, params
                      )
  
                      self.assertEqual(len(batches), expected_n_batches)
                      for batch in batches:
                          self.assertEqualVector(
                              batch.shape, expected_batch_shape
                          )
  
file_path: essentia/test/src/unittests/streaming/test_vectorrealtotensor.py
imports: from essentia_test import *
  from essentia.streaming import *
label_desc: Use image node_id 9 for calling the TestVectorRealToTensor obj's underlying member method code with example usage: obj.testOutputShapes() without return types