code: def l2_gram_schmidt(list, lim):
      """
      Orthonormalizes the "list" of functions using the Gram-Schmidt process.
  
      Examples
      ========
  
      >>> from sympy import Symbol
      >>> from gibbs_phenomenon import l2_gram_schmidt
  
      >>> x = Symbol('x', real=True)    # perform computations over reals to save time
      >>> l2_gram_schmidt([1, x, x**2], (x, -1, 1))
      [sqrt(2)/2, sqrt(6)*x/2, 3*sqrt(10)*(x**2 - 1/3)/4]
  
      """
      r = []
      for a in list:
          if r == []:
              v = a
          else:
              v = a - l2_projection(a, r, lim)
          v_norm = l2_norm(v, lim)
          if v_norm == 0:
              raise ValueError(
                  "The sequence is not linearly independent."
              )
          r.append(v / v_norm)
      return r
  
file_path: sympy/examples/advanced/gibbs_phenomenon.py
imports: from sympy import var, sqrt, integrate, conjugate, seterr, Abs, pprint, I, pi, sin, cos, sign, lambdify, Integral, S
label_desc: Use image node_id 4 for calling a global function with example usage: l2_gram_schmidt(list, lim) and returns: r