def AssignProjectID(args: 'argparse.Namespace') -> None:
  """Configures the project_id to be used by the tool.

  Args:
    args (argparse.Namespace): Arguments from ArgumentParser.

  Raises:
    AttributeError: If no project_id was provided and none was inferred
        from the gcloud environment.
  """
  if not args.project:
    _, project_id = default()  # type: ignore [no-untyped-call]
    if project_id:
      args.project = project_id
    else:
      raise AttributeError(
          "No project_id was found. Either pass a --project=project_id"
          " to the CLI (`cloudforensics gcp --project=project_id`), or set "
          "one in your gcloud SDK: `gcloud config set project project_id`")
Configures the project_id to be used by the tool.

Args:
args (argparse.Namespace): Arguments from ArgumentParser.

Raises:
AttributeError: If no project_id was provided and none was inferred
from the gcloud environment.
tools/gcp_cli.py