docstr: Fixture to kick off prepare_sync or prepare_async in the background.
  
  Tests that use this fixture will be run twice: once using prepare_sync,
  once using prepare_async.
  
  Example usage:
  
      def test_smoke(prepare: "PrepareFixture"):
          step_prepare = StepPrepare(...)
          step_prepare.start()
          res = prepare(step_prepare, simple_file_spec(name="foo")).result()
          assert res.birth_artifact_id == ...
code: def prepare(self, request) -> "PrepareFixture":
      """Fixture to kick off prepare_sync or prepare_async in the background.
  
      Tests that use this fixture will be run twice: once using prepare_sync,
      once using prepare_async.
  
      Example usage:
  
          def test_smoke(prepare: "PrepareFixture"):
              step_prepare = StepPrepare(...)
              step_prepare.start()
              res = prepare(step_prepare, simple_file_spec(name="foo")).result()
              assert res.birth_artifact_id == ...
      """
      if request.param == "sync":
          return self._bg_prepare_sync
      elif request.param == "async":
          return self._bg_prepare_async
      else:
          raise ValueError(f"Unknown prepare mode: {request.param}")
  
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 TestStepPrepare obj's underlying member method code with example usage: obj.prepare(request) and returns: self, self