'Returns the leading coefficient of ``f``.
Examples
>>> from sympy import Poly
>>> from sympy.abc import x
>>> Poly(4*x**3 + 2*x**2 + 3*x, x).LC()
4'

def LC(f, order=None):

    if (order is not None):
        return f.coeffs(order)[0]
    if hasattr(f.rep, 'LC'):
        result = f.rep.LC()
    else:
        raise OperationNotSupported(f, 'LC')
    return f.rep.dom.to_sympy(result)
