code: def _to_power_basis_degree8(nodes1, nodes2):
      r
      evaluated = [
          eval_intersection_polynomial(nodes1, nodes2, t_val) for t_val in _CHEB9
      ]
      return polynomial.polyfit(_CHEB9, evaluated, 8)
docs: r"""Compute the coefficients of an **intersection polynomial**.
  
      Helper for :func:`to_power_basis` in the case that B |eacute| zout's
      `theorem`_ tells us the **intersection polynomial** is degree
      :math:`8`. This happens if the two curves have degrees one and eight
      or have degrees two and four.
  
      .. note::
  
         This uses a least-squares fit to the function evaluated at the
         Chebyshev nodes (scaled and shifted onto ``[0, 1]``). Hence, the
         coefficients may be less stable than those produced for smaller
         degrees.
  
      Args:
          nodes1 (numpy.ndarray): The nodes in the first curve.
          nodes2 (numpy.ndarray): The nodes in the second curve.
  
      Returns:
          numpy.ndarray: ``9``-array of coefficients.