def METHOD_NAME(self, dtype, xp, scp):
    # Test if precenter gives the same result as manually precentering.
    dtype = xp.dtype(dtype)
    # Input parameters
    ampl = 2.
    w = 1.
    phi = 0.5 * xp.pi
    nin = 100
    nout = 1000
    p = 0.7  # Fraction of points to select
    offset = 0.15  # Offset to be subtracted in pre-centering
    # Randomly select a fraction of an array with timesteps
    r = testing.shaped_random((nin,), xp, dtype=dtype, scale=1.0,
                              seed=2353425)
    t = xp.linspace(0.01 * xp.pi, 10. * xp.pi, nin, dtype=dtype)[r >= p]
    # Plot a sine wave for the selected times
    x = ampl * xp.sin(w * t + phi) + offset
    # Define the array of frequencies for which to compute the periodogram
    f = xp.linspace(0.01, 10., nout, dtype=dtype)
    # Calculate Lomb-Scargle periodogram
    pgram = scp.signal.lombscargle(t, x, f, precenter=True)
    pgram2 = scp.signal.lombscargle(t, x - x.mean(), f, precenter=False)
    # check if centering worked
    return pgram, pgram2