code: def complex_cepstrum(x, n=None):
      """Compute the complex cepstrum of a real sequence.
      Parameters
      ----------
      x : ndarray
          Real sequence to compute complex cepstrum of.
      n : {None, int}, optional
          Length of the Fourier transform.
      Returns
      -------
      ceps : ndarray
          The complex cepstrum of the real data sequence `x` computed using the
          Fourier transform.
      ndelay : int
          The amount of samples of circular delay added to `x`.
      The complex cepstrum is given by
      .. math:: c[n] = F^{-1}\\left{\\log_{10}{\\left(F{x[n]}\\right)}\\right}
      where :math:`x_[n]` is the input signal and :math:`F` and :math:`F_{-1}
      are respectively the forward and backward Fourier transform.
      --------
      """
  
      def _unwrap(phase):
          samples = phase.shape[-1]
          unwrapped = numpy.unwrap(phase)
          center = (samples + 1) // 2
          if samples == 1:
              center = 0
          ndelay = numpy.array(
              numpy.round(unwrapped[..., center] / numpy.pi)
          )
          unwrapped -= (
              numpy.pi
              * ndelay[..., None]
              * numpy.arange(samples)
              / center
          )
          return unwrapped, ndelay
  
      spectrum = numpy.fft.fft(x, n=n)
      unwrapped_phase, ndelay = _unwrap(numpy.angle(spectrum))
      log_spectrum = (
          numpy.log(numpy.abs(spectrum)) + 1j * unwrapped_phase
      )
      ceps = numpy.fft.ifft(log_spectrum).real
  
      return ceps, ndelay
  
file_path: cupy/tests/cupyx_tests/signal_tests/acoustics_tests/test_cepstrum.py
imports: import pytest
  import numpy
  import cupy
  from cupy import testing
  import cupyx.signal
label_desc: Use image node_id 1 for calling a global function with example usage: complex_cepstrum(x, n) and returns: ceps,  ndelay, unwrapped,  ndelay