def METHOD_NAME(device_config: HTTP):
    def create_bat_component(component_config: HttpBatSetup):
        return HttpBat(device_config.id, component_config, device_config.configuration.url)
    def create_counter_component(component_config: HttpCounterSetup):
        return HttpCounter(device_config.id, component_config, device_config.configuration.url)
    def create_inverter_component(component_config: HttpInverterSetup):
        return HttpInverter(device_config.id, component_config, device_config.configuration.url)
    session = req.get_http_session()
    return ConfigurableDevice(
        device_config=device_config,
        component_factory=ComponentFactoryByType(
            bat=create_bat_component,
            counter=create_counter_component,
            inverter=create_inverter_component,
        ),
        component_updater=IndependentComponentUpdater(lambda component: component.update(session))
    )