def set_default(self, na):
kwargs = {}<EOL>if isinstance(na, (type, types.FunctionType)):<EOL><INDENT>kwargs['<STR_LIT:type>'] = na<EOL>kwargs['<STR_LIT>'] = True<EOL>kwargs["<STR_LIT:default>"] = argparse.SUPPRESS<EOL><DEDENT>elif isinstance(na, bool):<EOL><INDENT>kwargs['<STR_LIT:action>'] = '<STR_LIT>' if na else '<STR_LIT:store_true>'<EOL>kwargs['<STR_LIT>'] = False<EOL><DEDENT>elif isinstance(na, (int, float, str)):<EOL><INDENT>kwargs['<STR_LIT:type>'] = type(na)<EOL>kwargs['<STR_LIT:default>'] = na<EOL>kwargs['<STR_LIT>'] = False<EOL><DEDENT>elif isinstance(na, (list, set)):<EOL><INDENT>na = list(na)<EOL>kwargs['<STR_LIT:action>'] = '<STR_LIT>'<EOL>kwargs['<STR_LIT>'] = True<EOL>if len(na) > <NUM_LIT:0>:<EOL><INDENT>if isinstance(na[<NUM_LIT:0>], type):<EOL><INDENT>kwargs['<STR_LIT:type>'] = na[<NUM_LIT:0>]<EOL><DEDENT>else:<EOL><INDENT>kwargs['<STR_LIT:action>'] = '<STR_LIT:store>'<EOL>l = set()<EOL>ltype = None<EOL>for elt in na:<EOL><INDENT>vtype = type(elt)<EOL>l.add(elt)<EOL>if ltype is None:<EOL><INDENT>ltype = vtype<EOL><DEDENT>else:<EOL><INDENT>if ltype is not vtype:<EOL><INDENT>ltype = str<EOL><DEDENT><DEDENT><DEDENT>kwargs['<STR_LIT>'] = l<EOL>kwargs['<STR_LIT:type>'] = ltype<EOL><DEDENT><DEDENT><DEDENT>self.parser_kwargs.update(kwargs)<EOL>
this is used for introspection from the main() method when there is an
        argument with a default value, this figures out how to set up the ArgParse
        arguments