def load_battery(**config) -> _Battery:
    """Default battery loading function

    Loads and returns the _Battery interface suitable for the current running
    platform.

    Parameters
    ----------
    config: Dictionary of config options that are passed to the generated
    battery.

    Return
    ------
    The configured _Battery for the current platform.
    """
    system = platform.system()
    if system == "FreeBSD":
        return _FreeBSDBattery(str(config.get("battery", 0)))
    elif system == "Linux":
        return _LinuxBattery(**config)
    else:
        raise RuntimeError("Unknown platform!")
Default battery loading function

    Loads and returns the _Battery interface suitable for the current running
    platform.

    Parameters
    ----------
    config: Dictionary of config options that are passed to the generated
    battery.

    Return
    ------
    The configured _Battery for the current platform.
    
libqtile/widget/battery.py