def METHOD_NAME(n, x=None, alpha=None, **args):
    """Generates Laguerre polynomial of degree `n` in `x`."""
    if n < 0:
        raise ValueError(f"can't generate Laguerre polynomial of degree {n}")
    if alpha is not None:
        K, alpha = construct_domain(
            alpha, field=True)  # XXX: ground_field=True
    else:
        K, alpha = QQ, QQ(0)
    poly = _laguerre(int(n), alpha, K)
    if x is not None:
        poly = Poly(poly, x, domain=K)
    else:
        poly = PurePoly(poly, Dummy('x'), domain=K)
    if not args.get('polys', False):
        return poly.as_expr()
    return poly