#NEWLINE# @ staticmethod #NEWLINE# def create_devices( cls , collection , config , machine , validate = True ) : #NEWLINE# #INDENT# if ( config and hasattr ( cls , 'device_class_init' ) ) : #NEWLINE# #INDENT# cls . device_class_init ( machine ) #NEWLINE# #UNINDENT# if config : #NEWLINE# #INDENT# for device in config : #NEWLINE# #INDENT# if ( not config [ device ] ) : #NEWLINE# #INDENT# raise AssertionError ( "Device '{}' has an empty config." . format ( device ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( type ( config [ device ] ) is not dict ) : #NEWLINE# #INDENT# raise AssertionError ( "Device '{}' does not have a valid config." . format ( device ) ) #NEWLINE# #UNINDENT# #UNINDENT# cls ( machine , device , config [ device ] , collection , validate )