def METHOD_NAME():
  print("complex_to_complex")
  for n in range(1,256+1):
    dp = (flex.random_double(size=n)*2-1) * flex.polar(
      1, flex.random_double(size=n)*2-1)
    dw = dp.deep_copy()
    fft = fftpack.complex_to_complex(n)
    fftw3tbx.complex_to_complex_in_place(data=dw, exp_sign=-1)
    fft.forward(dp)
    assert flex.max(flex.abs(dw-dp)) < 1.e-6
    fftw3tbx.complex_to_complex_in_place(data=dw, exp_sign=+1)
    fft.backward(dp)
    assert flex.max(flex.abs(dw-dp)) < 1.e-6
  for n,n_repeats in [(1200,500), (9600,250)]:
    print("  factors of %d:" % n, list(fftpack.complex_to_complex(n).factors()))
    print("  repeats:", n_repeats)
    d0 = (flex.random_double(size=n)*2-1) * flex.polar(
      1, flex.random_double(size=n)*2-1)
    #
    t0 = time.time()
    for i_trial in range(n_repeats):
      d = d0.deep_copy()
    overhead = time.time()-t0
    print("    overhead: %.2f seconds" % overhead)
    #
    t0 = time.time()
    for i_trial in range(n_repeats):
      d = d0.deep_copy()
      fftw3tbx.complex_to_complex_in_place(data=d, exp_sign=-1)
      fftw3tbx.complex_to_complex_in_place(data=d, exp_sign=+1)
    print("    fftw:     %.2f seconds" % (time.time()-t0-overhead))
    #
    t0 = time.time()
    for i_trial in range(n_repeats):
      d = d0.deep_copy()
      fftpack.complex_to_complex(n).forward(d)
      fftpack.complex_to_complex(n).backward(d)
    print("    fftpack:  %.2f seconds" % (time.time()-t0-overhead))
    sys.stdout.flush()