code: def main(args):
      resdef = resourcedef.ResourceDef("download", {})
      source = resourcedef.ResourceSource(resdef, args.url)
      download_dir = resolver.url_source_download_dir(source)
      util.ensure_dir(download_dir)
      try:
          source_path = pip_util.download_url(source.uri, download_dir)
      except Exception as e:
          _handle_download_error(e, source)
      else:
          sha256 = util.file_sha256(source_path, use_cache=False)
          print(f"{sha256}  {source_path}")
  
imports: import logging
  from guild import cli
  from guild import pip_util
  from guild import resolver
  from guild import resourcedef
  from guild import util
label_desc: Use image node_id 1 for calling a global function with example usage: main(args) without return types