code: def test_batches_requests(self, prepare: "PrepareFixture"):
      caf_result = mock_create_artifact_files_result(["a", "b"])
      api = Mock(create_artifact_files=Mock(return_value=caf_result))
  
      step_prepare = StepPrepare(
          api=api, batch_time=1, inter_event_time=1, max_batch_size=10
      )
      step_prepare.start()
  
      future_a = prepare(step_prepare, simple_file_spec(name="a"))
      future_b = prepare(step_prepare, simple_file_spec(name="b"))
      step_prepare.finish()
  
      res_a = future_a.result()
      res_b = future_b.result()
  
      assert res_a.upload_url == caf_result["a"]["uploadUrl"]
      assert res_b.upload_url == caf_result["b"]["uploadUrl"]
  
      # make sure the URLs are different, just in case the fixture returns a constant
      assert res_a.upload_url != res_b.upload_url
  
      api.create_artifact_files.assert_called_once()
  
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 5 for calling the TestStepPrepare obj's underlying member method code with example usage: obj.test_batches_requests(prepare) without return types