def GetBucketSize(args: 'argparse.Namespace') -> None:
  """Get the size of a GCS bucket.

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

  Raises:
    AttributeError: If no project_id was provided and none was inferred
        from the gcloud environment.
  """

  AssignProjectID(args)

  gcs = gcp_storage.GoogleCloudStorage(args.project)
  results = gcs.GetBucketSize(args.path)
  for bucket_name, bucket_size in results.items():
    logger.info('{0:s}: {1:d}b'.format(bucket_name, bucket_size))
Get the size of a GCS bucket.

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