code: def asyncify(f):
      """Convert a sync function to an async function. Useful for building mock async wrappers."""
  
      @functools.wraps(f)
      async def async_f(*args, **kwargs):
          return await asyncio.get_event_loop().run_in_executor(
              None, lambda: f(*args, **kwargs)
          )
  
      return async_f
  
imports: import asyncio
  import concurrent.futures
  import functools
  import queue
  import random
  import threading
  import time
  from pathlib import Path
  from typing import Any, Callable, Iterable, MutableSequence, Optional
  from unittest.mock import DEFAULT, Mock, patch
  import pytest
  from wandb.filesync import stats
  from wandb.filesync.step_upload import Event, RequestCommitArtifact, RequestFinish, RequestUpload, StepUpload
  from wandb.sdk.internal import file_stream, internal_api
  from wandb.sdk.internal.settings_static import SettingsStatic
  from wandb.sdk.wandb_settings import Settings
label_desc: Use image node_id 1 for calling a global function with example usage: asyncify(f) and returns: async_f, unknown