code: def _sweep_poly_phase(t, poly):
      """
      Calculate the phase used by sweep_poly to generate its output.
  
      See `sweep_poly` for a description of the arguments.
  
      """
      if isinstance(poly, cupy.poly1d):
          poly = poly.coeffs
  
      # a replacement for `intpoly = np.polyint(poly)`
      intpoly = cupy.zeros(poly.shape[0] + 1)
      intpoly[:-1] = poly / cupy.arange(1, poly.shape[0] + 1)[::-1]
  
      phase = 2 * cupy.pi * cupy.polyval(intpoly, t)
      return phase
  
file_path: cupy/cupyx/scipy/signal/_waveforms.py
imports: import cupy
  from cupy._core._scalar import get_typename
  from cupy_backends.cuda.api import runtime
  import numpy
label_desc: Use image node_id 8 for calling a global function with example usage: _sweep_poly_phase(t, poly) and returns: phase