def METHOD_NAME(rng, dt, sr):
    ns = T.NS[dt][sr]
    ok = True
    attdet = AttackDetector(dt, sr)
    state_c = initial_state()
    x_c = np.zeros(ns+6)
    for run in range(100):
        ### Generate noise, and an attack at random point
        x = ((2 * rng.random(ns)) - 1) * (2 ** 8 - 1)
        x[(ns * rng.random()).astype(int)] *= 2 ** 7
        ### Check Implementation
        f_att = attdet.run(100, x)
        x_c = np.append(x_c[-6:], x)
        f_att_c = lc3.attdet_run(dt, sr, 100, state_c, x_c)
        ok = ok and f_att_c == f_att
        ok = ok and np.amax(np.abs(1 - state_c['en1']/attdet.en1)) < 2
        ok = ok and np.amax(np.abs(1 - state_c['an1']/attdet.an1)) < 2
        ok = ok and state_c['p_att'] == attdet.p_att
    return ok