code: def test_get_batches(self):
      self.assertEqual(
          [[0, 1, 2], [3, 4, 5], [6, 7, 8], [9]],
          list(get_batches(range(10), batch_size=3)),
      )
      self.assertEqual(
          [[0, 1, 2], [3, 4, 5], [6, 7, 8]],
          list(get_batches(range(9), batch_size=3)),
      )
      self.assertEqual(
          [[1], [2], [3]], list(get_batches([1, 2, 3], batch_size=1))
      )
      self.assertEqual(
          [[1], [2], [3]],
          list(get_batches(iter([1, 2, 3]), batch_size=1)),
      )
      self.assertEqual(
          [[1, 2, 3]], list(get_batches([1, 2, 3], batch_size=100))
      )
  
      with self.assertRaises(AssertionError):
          next(get_batches([1, 2, 3], batch_size=0))
  
      # but generator itself doesn't raise error untill used
      get_batches([1, 2, 3], batch_size=0)
  
imports: import unittest
  from neptune.internal.utils.iteration import get_batches
label_desc: Use image node_id 1 for calling the TestIterationUtils obj's underlying member method code with example usage: obj.test_get_batches() without return types