#NEWLINE# def load_resource( resources , resource_class , reset = False ) : #NEWLINE# #INDENT# ' Given a dictionary of a given resource_type, instantiate them.\n\n    The resources are loaded into the given resource registry.\n    ' #NEWLINE# if resource_class : #NEWLINE# #INDENT# logger . debug ( 'Clearing old %s entries from registry.' , resource_class . __name__ ) #NEWLINE# resource_class . registry . clear ( ) #NEWLINE# #UNINDENT# for ( name , kwargs ) in resources . items ( ) : #NEWLINE# #INDENT# if ( not kwargs ) : #NEWLINE# #INDENT# kwargs = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# resource_class ( name , ** kwargs )