code: def parse_args():
      
      parser = argparse.ArgumentParser(description="Converts, and downloads a vm by name from vCenter to OVF in specified"
                                                   " directory, then uploads the image as an AMI. AMI will be uploaded "
                                                   "using specified AWS profile, to specified regions. ")
      parser.add_argument('-i', '--vcenter_host', type=str, required=True, help='Hostname or Ip of vCenter API of VM')
      parser.add_argument('-u', '--vcenter_user', type=str, required=True, help='Username for vCenter authentication')
      parser.add_argument('-p', '--vcenter_pass', type=str, required=True, help='Password for authentication to vCenter API')
      parser.add_argument('-n', '--vm_name', type=str, required=True, help='Name of the VM in vCenter')
      parser.add_argument('-d', '--directory', type=str, default=tempfile.mkdtemp(),
                          help='Directory to save the vmdk temp file (defaults to temp location')
      parser.add_argument('-w', '--vcenter_port', type=str, default='443',
                          help='Port to use for communication to vcenter api. Default is 443')
      args = parser.parse_args()
      validate_args(args)
      return args
docs: Argument parser and validator
      :return: args