code: async def _async_supervisor(func, animation_, step, *args, **kwargs):
      
      with ThreadPoolExecutor(max_workers=2) as pool:
          with _terminating_event() as event:
              pool.submit(animate_cli, animation_, step, event)
              result = await func(*args, **kwargs)
      return result
docs: Supervisor for running an animation with an asynchronous function.
  
      Args:
          func: A function to be run alongside an animation.
          animation_: An infinite generator that produces
          strings for the animation.
          step: Seconds between each animation frame.
          *args: Arguments for func.
          **kwargs: Keyword arguments for func.
      Returns:
          The result of func(*args, **kwargs)
      Raises:
          Any exception that is thrown when executing func.