def calculate_default_type(arg, has_default, default_value, params_help):
positional = True<EOL>arg_params = {}<EOL>arg_name = arg<EOL>try:<EOL><INDENT>arg_params['<STR_LIT>'] = params_help[arg_name]<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT>if has_default:<EOL><INDENT>positional = False<EOL><DEDENT>if default_value in (int, float):<EOL><INDENT>positional = True<EOL><DEDENT>if default_value is True:<EOL><INDENT>arg_params['<STR_LIT:action>'] = '<STR_LIT>'<EOL><DEDENT>elif default_value is False:<EOL><INDENT>arg_params['<STR_LIT:action>'] = '<STR_LIT:store_true>'<EOL><DEDENT>if type(default_value) in (int, float):<EOL><INDENT>arg_params['<STR_LIT:type>'] = type(default_value)<EOL><DEDENT>if positional:<EOL><INDENT>if arg_name.startswith('<STR_LIT:_>'):<EOL><INDENT>arg_params['<STR_LIT>'] = '<STR_LIT:?>'<EOL>arg_params['<STR_LIT:default>'] = None<EOL>arg_params['<STR_LIT>'] = arg_name.lstrip('<STR_LIT:_>')<EOL><DEDENT><DEDENT>else:<EOL><INDENT>arg_params['<STR_LIT:default>'] = default_value<EOL>if len(arg_name) == <NUM_LIT:1>:<EOL><INDENT>arg_name = '<STR_LIT:->' + arg_name<EOL><DEDENT>else:<EOL><INDENT>arg_name = '<STR_LIT>' + arg_name<EOL><DEDENT><DEDENT>return arg_name, arg_params<EOL>
This function looks at the default value and returns the type that
       should be supplied to the parser