code: def _maybe_sync_run(run):
      if run.status != "running":
          log.debug(
              "run %s status is '%s', skipping sync", run.id, run.status
          )
          return
      log.debug("getting remote run %s", run.id)
      remote_run = _remote_run_for_local_run(run)
      log.debug(
          "remote run for %s: %s", run.id, _remote_run_desc(remote_run)
      )
      if remote_run:
          cli.out(f"Syncing {run.id}")
          _sync_remote_run(remote_run)
  
file_path: guildai/guild/commands/sync_impl.py
imports: import logging
  import time
  from guild import cli
  from guild import click_util
  from guild import remote
  from guild import remote_run_support
  from .None import remote_impl_support
  from .None import runs_impl
label_desc: Use image node_id 2 for calling a global function with example usage: _maybe_sync_run(run) without return types