code: def ss2zpk(A, B, C, D, input=0):
      """State-space representation to zero-pole-gain representation.
  
      A, B, C, D defines a linear state-space system with `p` inputs,
      `q` outputs, and `n` state variables.
  
      Parameters
      ----------
      A : array_like
          State (or system) matrix of shape ``(n, n)``
      B : array_like
          Input matrix of shape ``(n, p)``
      C : array_like
          Output matrix of shape ``(q, n)``
      D : array_like
          Feedthrough (or feedforward) matrix of shape ``(q, p)``
      input : int, optional
          For multiple-input systems, the index of the input to use.
  
      Returns
      -------
      z, p : sequence
          Zeros and poles.
      k : float
          System gain.
  
      See Also
      --------
      scipy.signal.ss2zpk
  
      """
      return tf2zpk(*ss2tf(A, B, C, D, input=input))
  
imports: import warnings
  import math
  from math import pi, prod
  import cupy
  from cupyx.scipy.special import binom
  import cupyx.scipy.special
  from cupyx.scipy.signal import _optimize
  from cupyx.scipy.signal._polyutils import roots, poly
  from cupyx.scipy.signal._lti_conversion import abcd_normalize
label_desc: Use image node_id 28 for calling a global function with example usage: ss2zpk(A, B, C, D, input) and returns: tf2zpk