#NEWLINE# def filter_sk_params( self , fn , override = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) : #NEWLINE# #INDENT# "Filter sk_params and return those in fn's arguments\n\n        # Arguments\n            fn : arbitrary function\n            override: dictionary, values to overrid sk_params\n\n        # Returns\n            res : dictionary dictionary containing variabls\n                in both sk_params and fn's arguments.\n        " #NEWLINE# res = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# fn_args = inspect . getargspec ( fn ) [ 0 ] #NEWLINE# for ( name , value ) in self . sk_params . items ( ) : #NEWLINE# #INDENT# if ( name in fn_args ) : #NEWLINE# #INDENT# res . update ( { #NEWLINE# #INDENT# name : value , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# #UNINDENT# res . update ( override ) #NEWLINE# return res