#NEWLINE# @ classmethod #NEWLINE# @ memoize #NEWLINE# def for_node( cls , node ) : #NEWLINE# #INDENT# from graphene.relay.utils import is_node #NEWLINE# assert is_node ( node ) , 'ObjectTypes in a edge have to be Nodes' #NEWLINE# node_field = Field ( node , description = 'The item at the end of the edge' ) #NEWLINE# return type ( ( '%s%s' % ( node . _meta . type_name , cls . _meta . type_name ) ) , ( cls , ) , { #NEWLINE# #INDENT# 'node_type' : node , #NEWLINE# 'node' : node_field , #NEWLINE# #UNINDENT# } )