code: def _async_callable(func):
      
      if isinstance(func, types.CoroutineType):
  
          return func
  
      @functools.wraps(func)
      async def _async_def_wrapper(*args, **kwargs):
          """Wrap a a sync callable in an async def."""
          return func(*args, **kwargs)
  
      return _async_def_wrapper
docs: Ensure the callable is an async def.