#NEWLINE# def track_record_dependency( self , record ) : #NEWLINE# #INDENT# ctx = get_ctx ( ) #NEWLINE# if ( ctx is not None ) : #NEWLINE# #INDENT# for filename in record . iter_source_filenames ( ) : #NEWLINE# #INDENT# ctx . record_dependency ( filename ) #NEWLINE# #UNINDENT# for virtual_source in record . iter_virtual_sources ( ) : #NEWLINE# #INDENT# ctx . record_virtual_dependency ( virtual_source ) #NEWLINE# #UNINDENT# if ( getattr ( record , 'datamodel' , None ) and record . datamodel . filename ) : #NEWLINE# #INDENT# ctx . record_dependency ( record . datamodel . filename ) #NEWLINE# for dep_model in self . iter_dependent_models ( record . datamodel ) : #NEWLINE# #INDENT# if dep_model . filename : #NEWLINE# #INDENT# ctx . record_dependency ( dep_model . filename ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return record