code: async def arun_process(path: Union[Path, str], target: Callable, *,
                         args: Tuple[Any]=(),
                         kwargs: Dict[str, Any]=None,
                         callback: Callable[[Set[Tuple[Change, str]]], Awaitable]=None,
                         watcher_cls: Type[AllWatcher]=PythonWatcher,
                         debounce=400,
                         min_sleep=100):
      
      watcher = awatch(path, watcher_cls=watcher_cls, debounce=debounce, min_sleep=min_sleep)
      start_process = partial(_start_process, target=target, args=args, kwargs=kwargs)
      process = await watcher.run_in_executor(start_process)
      reloads = 0
  
      async for changes in watcher:
          callback and await callback(changes)
          await watcher.run_in_executor(_stop_process, process)
          process = await watcher.run_in_executor(start_process)
          reloads += 1
      return reloads
docs: Run a function in a subprocess using multiprocessing.Process, restart it whenever files change in path.