code: def freqs(b, a, worN=200, plot=None):
      """
      Compute frequency response of analog filter.
  
      Given the M-order numerator `b` and N-order denominator `a` of an analog
      filter, compute its frequency response::
  
               b[0]*(jw)**M + b[1]*(jw)**(M-1) + ... + b[M]
       H(w) = ----------------------------------------------
               a[0]*(jw)**N + a[1]*(jw)**(N-1) + ... + a[N]
  
      Parameters
      ----------
      b : array_like
          Numerator of a linear filter.
      a : array_like
          Denominator of a linear filter.
      worN : {None, int, array_like}, optional
          If None, then compute at 200 frequencies around the interesting parts
          of the response curve (determined by pole-zero locations). If a single
          integer, then compute at that many frequencies. Otherwise, compute the
          response at the angular frequencies (e.g., rad/s) given in `worN`.
      plot : callable, optional
          A callable that takes two arguments. If given, the return parameters
          `w` and `h` are passed to plot. Useful for plotting the frequency
          response inside `freqs`.
  
      Returns
      -------
      w : ndarray
          The angular frequencies at which `h` was computed.
      h : ndarray
          The frequency response.
  
      See Also
      --------
      scipy.signal.freqs
      freqz : Compute the frequency response of a digital filter.
  
      """
      if worN is None:
          # For backwards compatibility
          w = findfreqs(b, a, 200)
  
      else:
          N, _is_int = _try_convert_to_int(worN)
          if _is_int:
              w = findfreqs(b, a, N)
          else:
              w = cupy.atleast_1d(worN)
  
      s = 1j * w
      h = cupy.polyval(b, s) / cupy.polyval(a, s)
  
      if plot is not None:
          plot(w, h)
  
      return w, h
  
imports: import operator
  from math import pi
  import warnings
  import cupy
  from cupy.polynomial.polynomial import polyval, polyvalfromroots
  import cupyx.scipy.fft
  from cupyx import jit
  from cupyx.scipy._lib._util import float_factorial
  from cupyx.scipy.signal._polyutils import roots
label_desc: Use image node_id 3 for calling a global function with example usage: freqs(b, a, worN, plot) and returns: w,  h