docstr: Fixture to run either prepare_sync or prepare_async and return the result.
  
  Tests that use this fixture will run twice: once where it uses the sync impl,
  and once where it uses the async impl. This ensures that whatever logic you're
  testing works with both sync and async impls.
  
  Example usage:
  
      def test_smoke(store_file: "StoreFileFixture", api):
          store_file(WandbStoragePolicy(api=api), entry_local_path=example_file)
          api.upload_method.assert_called_once()
docstr_tok: ["Fixture","to","run","either","prepare_sync","or","prepare_async","and","return","the","result",".","Tests","that","use","this","fixture","will","run","twice",":","once","where","it","uses","the","sync","impl",",","and","once","where","it","uses","the","async","impl",".","This","ensures","that","whatever","logic","you're","testing","works","with","both","sync","and","async","impls",".","Example","usage",":","def","test_smoke","(","store_file",":","``","StoreFileFixture","''",",","api",")",":","store_file","(","WandbStoragePolicy","(","api=api",")",",","entry_local_path=example_file",")","api.upload_method.assert_called_once","(",")"]
code: def store_file(self, store_file_mode: str) -> "StoreFileFixture":
      """Fixture to run either prepare_sync or prepare_async and return the result.
  
      Tests that use this fixture will run twice: once where it uses the sync impl,
      and once where it uses the async impl. This ensures that whatever logic you're
      testing works with both sync and async impls.
  
      Example usage:
  
          def test_smoke(store_file: "StoreFileFixture", api):
              store_file(WandbStoragePolicy(api=api), entry_local_path=example_file)
              api.upload_method.assert_called_once()
      """
      if store_file_mode == "sync":
          return TestStoreFile._store_file_sync
      elif store_file_mode == "async":
          return TestStoreFile._store_file_async
      else:
          raise ValueError(
              f"Unknown store_file mode: {store_file_mode}"
          )
  
imports: import asyncio
  import functools
  import queue
  import shutil
  import unittest.mock
  from pathlib import Path
  from typing import TYPE_CHECKING, Any, Mapping, Optional
  from unittest.mock import Mock
  import pytest
  import requests
  from wandb.filesync.step_prepare import ResponsePrepare, StepPrepare
  from wandb.sdk.artifacts.artifact import Artifact
  from wandb.sdk.artifacts.artifact_file_cache import ArtifactFileCache
  from wandb.sdk.artifacts.artifact_instance_cache import artifact_instance_cache
  from wandb.sdk.artifacts.artifact_manifest_entry import ArtifactManifestEntry
  from wandb.sdk.artifacts.exceptions import ArtifactNotLoggedError
  from wandb.sdk.artifacts.storage_policies.wandb_storage_policy import WandbStoragePolicy
label_desc: Use image node_id 5 for calling the TestStoreFile obj's underlying member method code with example usage: obj.store_file(store_file_mode) and returns: TestStoreFile, TestStoreFile