code: def build_command(args):
      base_box_dir = THIS_DIR / "base-box"
  
      generate_packer_config(
          os.path.join(base_box_dir, PACKER_FILE_NAME),
          args.provider or ALL_PROVIDERS,
      )
      env = copy.copy(os.environ)
      packer_args = ["packer", "build", "-force"]
      env["PACKER_LOG"] = "1"
      env["PACKER_LOG_PATH"] = "packer.log"
      if args.debug_packer:
          packer_args += ["-debug"]
  
      packer_args += [PACKER_FILE_NAME]
  
      box_package_exists = False
      if not args.force:
          box_package_dirs = [
              (base_box_dir / f"output-packer-{p}")
              for p in args.provider
          ]
          for box_package_dir in box_package_dirs:
              if box_package_dir.exists():
                  print(
                      f"A box package {box_package_dir} already exists. Refusing to overwrite it!"
                  )
                  box_package_exists = True
  
      if box_package_exists:
          sys.exit(
              "One or more box packages exist (see list above). To rebuild use '--force'"
          )
  
      subprocess.check_call(
          packer_args, cwd=THIS_DIR / "base-box", env=env
      )
  
imports: import argparse
  import copy
  import json
  import logging
  import pathlib
  import os
  import re
  import shlex
  import shutil
  import subprocess
  import sys
  import pathlib
label_desc: Use image node_id 7 for calling a global function with example usage: build_command(args) without return types