code: def _compute_residues(poles, multiplicity, numerator):
      denominator_factors, _ = _compute_factors(poles, multiplicity)
      numerator = numerator.astype(poles.dtype)
  
      residues = []
      for pole, mult, factor in zip(
          poles, multiplicity, denominator_factors
      ):
          if mult == 1:
              residues.append(
                  np.polyval(numerator, pole) / np.polyval(factor, pole)
              )
          else:
              numer = numerator.copy()
              monomial = np.array([1, -pole])
              factor, d = np.polydiv(factor, monomial)
  
              block = []
              for _ in range(mult):
                  numer, n = np.polydiv(numer, monomial)
                  r = n[0] / d[0]
                  numer = np.polysub(numer, r * factor)
                  block.append(r)
  
              residues.extend(reversed(block))
  
      return np.asarray(residues)
  
imports: import operator
  import math
  import timeit
  from scipy.spatial import cKDTree
  from .None import sigtools, dlti
  from ._upfirdn import upfirdn, _output_len, _upfirdn_modes
  from scipy import linalg, fft
  from scipy.fft._helper import _init_nd_shape_and_axes
  from scipy._lib._util import prod
  import numpy
  from scipy.special import lambertw
  from .windows import get_window
  from ._arraytools import axis_slice, axis_reverse, odd_ext, even_ext, const_ext
  from .filter_design import cheby1, _validate_sos
  from .fir_filter_design import firwin
  from ._sosfilt import _sosfilt
  import warnings
label_desc: Use image node_id 36 for calling a global function with example usage: _compute_residues(poles, multiplicity, numerator) and returns: np