def METHOD_NAME(components: Iterable[Union[VartaBatApi, VartaBatModbus, VartaCounter]]):
    with client as c:
        for component in components:
            if isinstance(component, (VartaBatModbus, VartaCounter)):
                with SingleComponentUpdateContext(component.component_info):
                    component.update(c)
    for component in components:
        if isinstance(component, (VartaBatApi)):
            with SingleComponentUpdateContext(component.component_info):
                component.update()