code: def to_power_basis(nodes1, nodes2):
      
      # NOTE: There is no corresponding "enable", but the disable only applies
      #       in this lexical scope.
      # pylint: disable=too-many-return-statements
      _, num_nodes1 = nodes1.shape
      _, num_nodes2 = nodes2.shape
      if num_nodes1 == 2:
          if num_nodes2 == 2:
              return _to_power_basis11(nodes1, nodes2)
  
          elif num_nodes2 == 3:
              return _to_power_basis12(nodes1, nodes2)
  
          elif num_nodes2 == 4:
              return _to_power_basis13(nodes1, nodes2)
  
          elif num_nodes2 == 5:
              return _to_power_basis_degree4(nodes1, nodes2)
  
      elif num_nodes1 == 3:
          if num_nodes2 == 3:
              return _to_power_basis_degree4(nodes1, nodes2)
  
          elif num_nodes2 == 4:
              return _to_power_basis23(nodes1, nodes2)
  
          elif num_nodes2 == 5:
              return _to_power_basis_degree8(nodes1, nodes2)
  
      elif num_nodes1 == 4:
          if num_nodes2 == 4:
              return _to_power_basis33(nodes1, nodes2)
  
      raise NotImplementedError(
          "Degree 1",
          num_nodes1 - 1,
          "Degree 2",
          num_nodes2 - 1,
          _POWER_BASIS_ERR,
      )
docs: Compute the coefficients of an **intersection polynomial**.
  
      .. note::
  
         This assumes that the degree of the curve given by ``nodes1`` is
         less than or equal to the degree of that given by ``nodes2``.
  
      Args:
          nodes1 (numpy.ndarray): The nodes in the first curve.
          nodes2 (numpy.ndarray): The nodes in the second curve.
  
      Returns:
          numpy.ndarray: Array of coefficients.
  
      Raises:
          NotImplementedError: If the degree pair is not ``1-1``, ``1-2``,
              ``1-3``, ``1-4``, ``2-2``, ``2-3``, ``2-4`` or ``3-3``.