'Load configuration from a data structure loaded from the configuration
file and only minimally processed.
:param dict configuration: Agent configuration as returned by
``get_configuration``.
:param IReactorCore reactor: A provider of IReactorCore and
IReactorTime or None to use the global reactor.
:return: A new instance of ``cls`` with values loaded from the
configuration.'

@classmethod
def from_configuration(cls, configuration, reactor=None):

    if ('logging' in configuration):
        from logging.config import dictConfig
        dictConfig(configuration['logging'])
    host = configuration['control-service']['hostname']
    port = configuration['control-service']['port']
    node_credential = configuration['node-credential']
    ca_certificate = configuration['ca-certificate']
    (backend_description, api_args) = backend_and_api_args_from_configuration(configuration['dataset'])
    kwargs = dict(control_service_host=host, control_service_port=port, node_credential=node_credential, ca_certificate=ca_certificate, backend_description=backend_description, api_args=api_args)
    if (reactor is not None):
        kwargs['reactor'] = reactor
    return cls(**kwargs)
