code: def laguerre(n, monic=False):
      r"""Laguerre polynomial.
  
      Defined to be the solution of
  
      .. math::
          x\frac{d^2}{dx^2}L_n + (1 - x)\frac{d}{dx}L_n + nL_n = 0;
  
      :math:`L_n` is a polynomial of degree :math:`n`.
  
      Parameters
      ----------
      n : int
          Degree of the polynomial.
      monic : bool, optional
          If `True`, scale the leading coefficient to be 1. Default is
          `False`.
  
      Returns
      -------
      L : orthopoly1d
          Laguerre Polynomial.
  
      Notes
      -----
      The polynomials :math:`L_n` are orthogonal over :math:`[0,
      \infty)` with weight function :math:`e^{-x}`.
  
      """
      if n < 0:
          raise ValueError("n must be nonnegative.")
  
      if n == 0:
          n1 = n + 1
      else:
          n1 = n
      x, w, mu0 = roots_laguerre(n1, mu=True)
      if n == 0:
          x, w = [], []
      hn = 1.0
      kn = (-1) ** n / _gam(n + 1)
      p = orthopoly1d(
          x,
          w,
          hn,
          kn,
          lambda x: exp(-x),
          (0, inf),
          monic,
          lambda x: eval_laguerre(n, x),
      )
      return p
  
imports: from __future__ import division, print_function, absolute_import
  import numpy
  from numpy import exp, inf, pi, sqrt, floor, sin, cos, around, int, hstack, arccos, arange
  from scipy import linalg
  from scipy.special import airy
  from .None import _ufuncs
  from .None import _ufuncs
  from .None import specfun
  from ._ufuncs import binom, eval_jacobi, eval_sh_jacobi, eval_gegenbauer, eval_chebyt, eval_chebyu, eval_chebys, eval_chebyc, eval_sh_chebyt, eval_sh_chebyu, eval_legendre, eval_sh_legendre, eval_genlaguerre, eval_laguerre, eval_hermite, eval_hermitenorm
label_desc: Use image node_id 9 for calling a global function with example usage: laguerre(n, monic) and returns: p