code: def test_compute_factors(self):
      from cupyx.scipy.signal._polyutils import _compute_factors
  
      factors, poly = _compute_factors([1, 2, 3], [3, 2, 1])
      assert len(factors) == 3
      testing.assert_allclose(factors[0], [1, -7, 16, -12], atol=1e-15)
      testing.assert_allclose(
          factors[1], [1, -6, 12, -10, 3], atol=1e-15
      )
      testing.assert_allclose(
          factors[2], [1, -7, 19, -25, 16, -4], atol=1e-15
      )
      testing.assert_allclose(
          poly, [1, -10, 40, -82, 91, -52, 12], atol=1e-15
      )
  
      factors, poly = _compute_factors(
          [1, 2, 3], [3, 2, 1], include_powers=True
      )
      assert len(factors) == 6
      testing.assert_allclose(
          factors[0], [1, -9, 31, -51, 40, -12], atol=1e-15
      )
      testing.assert_allclose(
          factors[1], [1, -8, 23, -28, 12], atol=1e-15
      )
      testing.assert_allclose(factors[2], [1, -7, 16, -12], atol=1e-15)
      testing.assert_allclose(
          factors[3], [1, -8, 24, -34, 23, -6], atol=1e-15
      )
      testing.assert_allclose(
          factors[4], [1, -6, 12, -10, 3], atol=1e-15
      )
      testing.assert_allclose(
          factors[5], [1, -7, 19, -25, 16, -4], atol=1e-15
      )
  
      testing.assert_allclose(
          poly, [1, -10, 40, -82, 91, -52, 12], atol=1e-15
      )
  
imports: import numpy
  import pytest
  import cupy
  from cupy import testing
  import cupyx.scipy.signal
label_desc: Use image node_id 1 for calling the TestPartialFractionExpansion obj's underlying member method code with example usage: obj.test_compute_factors() without return types