code: def _gauss_legendre(order, composite=1):
      
      inner = numpy.ones(order+1)*0.5
      outer = numpy.arange(order+1)**2
      outer = outer/(16*outer-4.)
  
      banded = numpy.diag(numpy.sqrt(outer[1:]), k=-1) + numpy.diag(inner) + \
              numpy.diag(numpy.sqrt(outer[1:]), k=1)
      vals, vecs = numpy.linalg.eig(banded)
  
      abscis, weight = vals.real, vecs[0, :]**2
      indices = numpy.argsort(abscis)
      abscis, weight = abscis[indices], weight[indices]
  
      n_abscis = len(abscis)
  
      composite = numpy.array(composite).flatten()
      composite = list(set(composite))
      composite = [comp for comp in composite if (comp < 1) and (comp > 0)]
      composite.sort()
      composite = [0]+composite+[1]
  
      abscissas = numpy.empty(n_abscis*(len(composite)-1))
      weights = numpy.empty(n_abscis*(len(composite)-1))
      for dim in range(len(composite)-1):
          abscissas[dim*n_abscis:(dim+1)*n_abscis] = \
              abscis*(composite[dim+1]-composite[dim]) + composite[dim]
          weights[dim*n_abscis:(dim+1)*n_abscis] = \
              weight*(composite[dim+1]-composite[dim])
  
      return abscissas, weights
docs: Backend function.