def METHOD_NAME(freq, length, period_len, amplitude=0.5):
    """
    Generate `period_len` samples of sine of `freq` frequency and `amplitude`.
    It generates at least `length` samples, totalling at next multiple of
    period_len. E.g. sine(440, 15, 10) will generate two 10-item lists of
    samples. Returns list of floats in the range of [-1.0 .. 1.0].
    """
    t = 0
    while t < length:
        sample = []
        for i in range(period_len):
            sample.append(
                amplitude * math.sin(2 * math.pi * ((t + i) / (RATE / freq))))
        yield sample
        t += period_len