code: def _check_upload_config(package_file):
      gf = guildfile.for_file(package_file)
      if not gf.package.author_email:
          cli.error(
              f"missing package author-email in {package_file} - cannot upload\n"
              "Specify a valid email for package.author-email and try again."
          )
  
      if not _valid_email(gf.package.author_email):
          cli.error(
              f"invalid package author-email {gf.package.author_email!r} "
              "in {package_file} - cannot upload\n"
              "Specify a valid email for package.author-email and try again."
          )
  
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 4 for calling a global function with example usage: _check_upload_config(package_file) without return types