#NEWLINE# def _kwargs_for_callable( callable_ , data ) : #NEWLINE# #INDENT# argspec = compat . inspect_func_args ( callable_ ) #NEWLINE# if argspec [ 2 ] : #NEWLINE# #INDENT# return data #NEWLINE# #UNINDENT# namedargs = ( argspec [ 0 ] + [ v for v in argspec [ 1 : 3 ] if ( v is not None ) ] ) #NEWLINE# kwargs = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for arg in namedargs : #NEWLINE# #INDENT# if ( ( arg != 'context' ) and ( arg in data ) and ( arg not in kwargs ) ) : #NEWLINE# #INDENT# kwargs [ arg ] = data [ arg ] #NEWLINE# #UNINDENT# #UNINDENT# return kwargs