def import_lmfit(funcname='XU'):
    """
    lazy import function for lmfit
    """
    try:
        import lmfit
        return lmfit
    except ImportError:
        raise ImportError(
            '%s: Fitting of models needs the lmfit package (https://pypi.python.org/pypi/lmfit)'
             % funcname)
