code: def test_legendre():
      x, w = gauss_legendre(1, 17)
      assert [str(r) for r in x] == ["0"]
      assert [str(r) for r in w] == ["2.0000000000000000"]
  
      x, w = gauss_legendre(2, 17)
      assert [str(r) for r in x] == [
          "-0.57735026918962576",
          "0.57735026918962576",
      ]
      assert [str(r) for r in w] == [
          "1.0000000000000000",
          "1.0000000000000000",
      ]
  
      x, w = gauss_legendre(3, 17)
      assert [str(r) for r in x] == [
          "-0.77459666924148338",
          "0",
          "0.77459666924148338",
      ]
      assert [str(r) for r in w] == [
          "0.55555555555555556",
          "0.88888888888888889",
          "0.55555555555555556",
      ]
  
      x, w = gauss_legendre(4, 17)
      assert [str(r) for r in x] == [
          "-0.86113631159405258",
          "-0.33998104358485626",
          "0.33998104358485626",
          "0.86113631159405258",
      ]
      assert [str(r) for r in w] == [
          "0.34785484513745386",
          "0.65214515486254614",
          "0.65214515486254614",
          "0.34785484513745386",
      ]
  
file_path: sympy/sympy/integrals/tests/test_quadrature.py
imports: from sympy.core import S, Rational
  from sympy.integrals.quadrature import gauss_legendre, gauss_laguerre, gauss_hermite, gauss_gen_laguerre, gauss_chebyshev_t, gauss_chebyshev_u, gauss_jacobi, gauss_lobatto
label_desc: Use image node_id 1 for calling a global function with example usage: test_legendre() without return types