#NEWLINE# @ classmethod #NEWLINE# def from_configuration( cls , configuration , reactor = None ) : #NEWLINE# #INDENT# '\n        Load configuration from a data structure loaded from the configuration\n        file and only minimally processed.\n\n        :param dict configuration: Agent configuration as returned by\n            ``get_configuration``.\n        :param IReactorCore reactor: A provider of IReactorCore and\n            IReactorTime or None to use the global reactor.\n        :return: A new instance of ``cls`` with values loaded from the\n            configuration.\n        ' #NEWLINE# if ( 'logging' in configuration ) : #NEWLINE# #INDENT# from logging.config import dictConfig #NEWLINE# dictConfig ( configuration [ 'logging' ] ) #NEWLINE# #UNINDENT# host = configuration [ 'control-service' ] [ 'hostname' ] #NEWLINE# port = configuration [ 'control-service' ] [ 'port' ] #NEWLINE# node_credential = configuration [ 'node-credential' ] #NEWLINE# ca_certificate = configuration [ 'ca-certificate' ] #NEWLINE# ( backend_description , api_args ) = backend_and_api_args_from_configuration ( configuration [ 'dataset' ] ) #NEWLINE# kwargs = dict ( control_service_host = host , control_service_port = port , node_credential = node_credential , ca_certificate = ca_certificate , backend_description = api_args , api_args = api_args ) #NEWLINE# if ( reactor is not None ) : #NEWLINE# #INDENT# kwargs [ 'reactor' ] = reactor #NEWLINE# #UNINDENT# return cls ( ** kwargs )