code: def _remote_for_lock(remote_lock, local_run):
      try:
          return remotelib.for_name(remote_lock.remote_name)
      except LookupError:
          log.warning(
              "Cannot sync run %s: remote '%s' not defined",
              local_run.id,
              remote_lock.remote_name,
          )
          return None
  
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 5 for calling a global function with example usage: _remote_for_lock(remote_lock, local_run) and returns: remotelib, None