#NEWLINE# def construct_get_node( cls ) : #NEWLINE# #INDENT# get_node = getattr ( cls , 'get_node' , None ) #NEWLINE# assert get_node , ( 'get_node classmethod not found in %s Node' % cls ) #NEWLINE# assert callable ( get_node ) , 'get_node have to be callable' #NEWLINE# args = 3 #NEWLINE# if isinstance ( get_node , staticmethod ) : #NEWLINE# #INDENT# args -= 1 #NEWLINE# #UNINDENT# get_node_num_args = len ( inspect . getargspec ( get_node ) . args ) #NEWLINE# if ( get_node_num_args < args ) : #NEWLINE# #INDENT# warnings . warn ( 'get_node will receive also the info arg in future versions of graphene' . format ( get_node_num_args . __name__ ) , FutureWarning ) #NEWLINE# @ staticmethod #NEWLINE# @ wraps ( get_node ) #NEWLINE# def wrapped_node( * node_args ) : #NEWLINE# #INDENT# if ( len ( node_args ) < args ) : #NEWLINE# #INDENT# node_args += ( None , ) #NEWLINE# #UNINDENT# return get_node ( * node_args [ : ( - 1 ) ] ) #NEWLINE# #UNINDENT# setattr ( cls , 'get_node' , wrapped_node )