code: def test_respects_batch_size(self):
      q = Mock(
          get=Mock(
              side_effect=[
                  simple_request_prepare("a"),
                  simple_request_prepare("b"),
                  simple_request_prepare("c"),
              ]
          )
      )
      _, batch = gather_batch(q, 0.1, 0.1, 2)
      assert len(batch) == 2
      assert q.get.call_count == 2
  
imports: import asyncio
  import concurrent.futures
  import dataclasses
  import queue
  import threading
  from typing import TYPE_CHECKING, Iterable, Mapping, Tuple
  from unittest.mock import Mock, call
  import pytest
  from wandb.filesync.step_prepare import Request, RequestFinish, RequestPrepare, ResponsePrepare, StepPrepare, gather_batch
label_desc: Use image node_id 3 for calling the TestGatherBatch obj's underlying member method code with example usage: obj.test_respects_batch_size() without return types