code: def main(args):
      if not os.path.exists(config.cwd()):
          cli.error(
              f"{cmd_impl_support.cwd_desc(config.cwd())} does not exist\n"
              "Try specifying a different directory."
          )
      package_file = guildfile.guildfile_path()
      if not os.path.exists(package_file):
          cli.error(
              f"{cmd_impl_support.cwd_desc(config.cwd())} does not contain "
              "a guild.yml file\n"
              "guild.yml is required when creating a package. Create one "
              "in this directory first or try specifying a different directory."
          )
      if args.upload:
          _check_upload_support(package_file)
      out = package.create_package(
          package_file,
          clean=args.clean,
          dist_dir=args.dist_dir,
          upload_repo=args.upload,
          sign=args.sign,
          identity=args.identity,
          user=args.user,
          password=args.password,
          skip_existing=args.skip_existing,
          comment=args.comment,
          capture_output=args.capture_output,
      )
      return out
  
file_path: guildai/guild/commands/package_impl.py
imports: import re
  import os
  from guild import cli
  from guild import cmd_impl_support
  from guild import config
  from guild import guildfile
  from guild import package
label_desc: Use image node_id 1 for calling a global function with example usage: main(args) and returns: out