def get_band_power(spectrum: list, bands: dict) -> dict:
    """ Get the summed power of each frequency range provided by bands.

        Args:
            - spectrum: the spectrum to be summed against.
            - bands: the bands to sum powers of.
    """
    return {band: sum(spectrum[values[0]:values[1]])
            for band, values in bands.items()}