code: async def executor(func, *args, **kwargs):
      '''
      Execute a function in an executor thread.
  
      Args:
          todo ((func,args,kwargs)): A todo tuple.
      '''
      def syncfunc():
          return func(*args, **kwargs)
  
      loop = asyncio.get_running_loop()
      return await loop.run_in_executor(None, syncfuncync def executor(func, *args, **kwargs):
      '''
      Execute a function in an executor thread.
  
      Args:
          todo ((func,args,kwargs)): A todo tuple.
      '''
      def syncfunc():
          return func(*args, **kwargs)
  
      loop = asyncio.get_running_loop()
      return await loop.run_in_executor(None, syncfunc)
docs: Execute a function in an executor thread.
  
      Args:
          todo ((func,args,kwargs)): A todo tuple.