#NEWLINE# def needs_fixing( raw_params , kwargs_default = _kwargs_default_name ) : #NEWLINE# #INDENT# '\n    Returns string with the name of the kwargs dict if the params after the first star need fixing\n    Otherwise returns empty string\n    ' #NEWLINE# found_kwargs = False #NEWLINE# needs_fix = False #NEWLINE# for t in raw_params [ 2 : ] : #NEWLINE# #INDENT# if ( t . type == token . COMMA ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( t . type == token . NAME ) and ( not found_kwargs ) ) : #NEWLINE# #INDENT# needs_fix = True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( t . type == token . NAME ) and found_kwargs ) : #NEWLINE# #INDENT# return ( t . value if needs_fix else '' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( t . type == token . DOUBLESTAR ) : #NEWLINE# #INDENT# found_kwargs = True #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# return ( kwargs_default if needs_fix else '' )