def METHOD_NAME(self, args):
    arg_parser = get_argument_parser()
    arg_parser.add_argument('-t', '--type')
    arg_parser.add_argument('-d', '--description')
    arg_parser.add_argument('-f', '--file')
    (args, options) = parse_command_arguments(args, arg_parser)
    options.contents = None
    if is_interactive(options):
        options.type = prompt_user(_('GPG or SSL [G/S]:'))
        options.description = ''
        while options.description == '':
            options.description = prompt_user(_('Description:'))
        if self.user_confirm(_('Read an existing file [y/N]:'),
                             nospacer=True, ignore_yes=True):
            options.file = prompt_user('File:')
        else:
            options.contents = editor(delete=True)
    else:
        if not options.type:
            logging.error(_N('The key type is required'))
            return None
        if not options.description:
            logging.error(_N('A description is required'))
            return None
        if not options.file:
            logging.error(_N('A file containing the key is required'))
            return None
    # read the file the user specified
    if options.file:
        options.contents = read_file(options.file)
    if not options.contents:
        logging.error(_N('No contents of the file'))
        return None
    # translate the key type to what the server expects
    if re.match('G', options.type, re.I):
        options.type = 'GPG'
    elif re.match('S', options.type, re.I):
        options.type = 'SSL'
    else:
        logging.error(_N('Invalid key type'))
        return None
    return options