code: def quadratic_jacobian_polynomial(nodes):
      r
      # First evaluate the Jacobian at each of the 6 nodes.
      jac_parts = _helpers.matrix_product(nodes, _QUADRATIC_JACOBIAN_HELPER)
      jac_at_nodes = np.empty((1, 6), order="F")
      jac_at_nodes[0, 0] = two_by_two_det(jac_parts[:, :2])
      jac_at_nodes[0, 1] = two_by_two_det(jac_parts[:, 2:4])
      jac_at_nodes[0, 2] = two_by_two_det(jac_parts[:, 4:6])
      jac_at_nodes[0, 3] = two_by_two_det(jac_parts[:, 6:8])
      jac_at_nodes[0, 4] = two_by_two_det(jac_parts[:, 8:10])
      jac_at_nodes[0, 5] = two_by_two_det(jac_parts[:, 10:])
      # Convert the nodal values to the Bernstein basis...
      bernstein = _helpers.matrix_product(jac_at_nodes, _QUADRATIC_TO_BERNSTEIN)
      return bernstein
docs: r"""Compute the Jacobian determinant of a quadratic surface.
  
      .. note::
  
         This is used **only** by :meth:`Surface._compute_valid` (which is
         in turn used to compute / cache the :attr:`Surface.is_valid`
         property).
  
      Converts :math:`\det(J(s, t))` to a polynomial on the reference
      triangle and represents it as a surface object.
  
      .. note::
  
         This assumes that ``nodes`` is ``2 x 6`` but doesn't verify this.
         (However, the right multiplication by ``_QUADRATIC_JACOBIAN_HELPER``
         would fail if ``nodes`` wasn't ``R x 6`` and then the ensuing
         determinants would fail if there weren't 2 rows.)
  
      Args:
          nodes (numpy.ndarray): A 2 x 6 array of nodes in a surface.
  
      Returns:
          numpy.ndarray: 1 x 6 array, coefficients in Bernstein basis.