class_docstr: Syncer using a background process for asynchronous file transfer.
class_docstr_tok: ["Syncer","using","a","background","process","for","asynchronous","file","transfer","."]
docstr: Waits for the previous sync process to finish,
  then launches a new process that runs the given command.
docstr_tok: ["Waits","for","the","previous","sync","process","to","finish",",","then","launches","a","new","process","that","runs","the","given","command","."]
code: def _launch_sync_process(self, sync_command: Tuple[Callable, Dict]):
      """Waits for the previous sync process to finish,
      then launches a new process that runs the given command."""
      if self._sync_process:
          try:
              self.wait()
          except Exception:
              logger.warning(
                  f"Last sync command failed with the following error:\n"
                  f"{traceback.format_exc()}"
              )
  
      self._current_cmd = sync_command
      self.retry()
  
imports: import abc
  import logging
  import threading
  import time
  import traceback
  import warnings
  from dataclasses import dataclass
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  from ray._private.thirdparty.tabulate.tabulate import tabulate
  from ray.train.constants import _DEPRECATED_VALUE
  from ray.util import log_once
  from ray.util.annotations import PublicAPI
  from ray.widgets import Template
label_desc: Use image node_id 3 for calling the _BackgroundSyncer obj's underlying member method code with example usage: obj._launch_sync_process(sync_command) without return types