code: def test_q2q_batch(self):
      data = six.moves.range(10)
      q_in = Queue()
      q_out = Queue()
  
      for d in data:
          q_in.put(d)
  
      model_util._q2q_batch(
          lambda b: [x * x for x in b], q_in, q_out, batch_size=4
      )
  
      expected_out = [x * x for x in data]
      actual_out = []
      while True:
          try:
              actual_out.append(q_out.get(True, 1))
          except Empty:
              break
  
      self.assertEqual(expected_out, actual_out)
  
imports: import unittest
  import numpy
  import six
  from PIL import Image
  from io import BytesIO
  from timeout_decorator import timeout
  from studio import model_util
label_desc: Use image node_id 1 for calling the ModelUtilTest obj's underlying member method code with example usage: obj.test_q2q_batch() without return types