def netmiko_args(optional_args):
fields = py23_compat.argspec(BaseConnection.__init__)<EOL>args = fields[<NUM_LIT:0>]<EOL>defaults = fields[<NUM_LIT:3>]<EOL>check_self = args.pop(<NUM_LIT:0>)<EOL>if check_self != "<STR_LIT>":<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>netmiko_argument_map = dict(zip(args, defaults))<EOL>netmiko_filter = ["<STR_LIT>", "<STR_LIT:host>", "<STR_LIT:username>", "<STR_LIT:password>", "<STR_LIT>", "<STR_LIT>"]<EOL>for k in netmiko_filter:<EOL><INDENT>netmiko_argument_map.pop(k)<EOL><DEDENT>netmiko_optional_args = {}<EOL>for k, v in netmiko_argument_map.items():<EOL><INDENT>try:<EOL><INDENT>netmiko_optional_args[k] = optional_args[k]<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>return netmiko_optional_args<EOL>
Check for Netmiko arguments that were passed in as NAPALM optional arguments.

    Return a dictionary of these optional args  that will be passed into the Netmiko
    ConnectHandler call.