def _create_de_scrambling_key(Generator, n, w, max_freq):
    """Create de-scrambling key based on given Numpy Random Generator.

    Args:
        Generator(Numpy.random.generator): Random value generator seeded using password
        n (uint): Amount of shuffling operations to be done
        w (float): Bandwidth of the spectra to be shuffled, given in kHz
        max_freq(float): Maximum frequency limit of the shuffled spectra, given in kHz

    Returns:
        de_scrambling_key (list(dicts)): List of dictionaries, each containing a set of frequencies to be shuffled.
    """
    # Initialize de-scrambling key
    de_scrambling_key = [{'b1_cfreq': None, 'b2_cfreq': None} for _ in range(n)]

    # Populatue all list entries in the key in reversed order
    for i in reversed(range(n)):
        # Select two pseudo-random center frequncies for shuffling
        band1_center_freq = Generator.uniform(low=w, high=max_freq)
        band2_center_freq = Generator.uniform(low=w, high=max_freq)

        # Check that the two selected bands are not too close to each other
        while abs(band1_center_freq-band2_center_freq) < w:
            band1_center_freq = Generator.uniform(low=w, high=max_freq)
            band2_center_freq = Generator.uniform(low=w, high=max_freq)

        # Put center frequencies values into key
        de_scrambling_key[i]['b1_cfreq'] = band1_center_freq
        de_scrambling_key[i]['b2_cfreq'] = band2_center_freq

    print('1st key item:' + str(de_scrambling_key[0]))
    print('last key' + str(de_scrambling_key[-1]))
    return de_scrambling_key