code: def publish(args, ctx=None):
      if args.files and args.all_files:
          cli.error("--files and --all-files cannot both be used")
      if args.refresh_index:
          _refresh_index(args)
      else:
          _publish(args, ctx)
      _report_dir_size(args)
  
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 1 for calling a global function with example usage: publish(args, ctx) without return types