code: def _refresh_index(args, no_dest=False):
      if no_dest:
          dest_suffix = ""
      else:
          dest_suffix = (
              f" in {args.dest or publishlib.DEFAULT_DEST_HOME}"
          )
      print(f"Refreshing runs index{dest_suffix}")
      index_template = _index_template(args)
      try:
          publishlib.refresh_index(args.dest, index_template)
      except publishlib.TemplateError as e:
          cli.error(f"error refreshing index: {e}")
  
file_path: guildai/guild/commands/publish_impl.py
imports: import os
  from guild import batch_util
  from guild import cli
  from guild import config
  from guild import publish
  from guild import util
  from .None import runs_impl
label_desc: Use image node_id 4 for calling a global function with example usage: _refresh_index(args, no_dest) without return types