def StartAnalysisVm(args: 'argparse.Namespace') -> None:
  """Start forensic analysis VM.

  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)

  attach_disks = []
  if args.attach_disks:
    attach_disks = args.attach_disks.split(',')
    # Check if attach_disks parameter exists and if there
    # are any empty entries.
    if not (attach_disks and all(elements for elements in attach_disks)):
      logger.error('parameter --attach_disks: {0:s}'.format(
          args.attach_disks))
      return

  logger.info('Starting analysis VM...')
  vm = forensics.StartAnalysisVm(args.project,
                                 args.instance_name,
                                 args.zone,
                                 int(args.disk_size),
                                 args.disk_type,
                                 int(args.cpu_cores),
                                 attach_disks=attach_disks)

  logger.info('Analysis VM started.')
  logger.info('Name: {0:s}, Started: {1:s}'.format(vm[0].name, str(vm[1])))
Start forensic analysis VM.

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