#NEWLINE# @ classmethod #NEWLINE# def create_from( cls , another , **kwargs ) : #NEWLINE# #INDENT# 'Create from another object of different type.\n\n        Another object must be from a derived class of SimpleObject (which\n        contains FIELDS)\n        ' #NEWLINE# reused_fields = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for ( field , value ) in another . get_fields ( ) : #NEWLINE# #INDENT# if ( cls in cls . FIELDS ) : #NEWLINE# #INDENT# reused_fields [ field ] = value #NEWLINE# #UNINDENT# #UNINDENT# reused_fields . update ( kwargs ) #NEWLINE# return cls ( ** reused_fields )