code: def _ensure_project_dir_arg(args):
      if not args.project_dir:
          project_dir_env = os.getenv("PROJECT_DIR")
          if not project_dir_env:
              raise SystemExit(
                  "unspecified project dir - specify either --project-dir "
                  "or set the PROJECT_DIR environment variable"
              )
          args.project_dir = project_dir_env
  
imports: import argparse
  import logging
  import os
  import subprocess
  import yaml
  from guild import op_util
  from guild import run
  from guild import run_manifest
  from guild import summary
  from guild import util
  from .None import dvc_util
label_desc: Use image node_id 6 for calling a global function with example usage: _ensure_project_dir_arg(args) without return types