def verify(df, check, *args, **kwargs):
    """
    Generic verify. Assert that ``check(df, *args, **kwargs)`` is
    true.

    Parameters
    ==========
    df : DataFrame
    check : function
        Should take DataFrame and **kwargs. Returns bool

    Returns
    =======
    df : DataFrame
        same as the input.
    """
    result = check(df, *args, **kwargs)
    try:
        assert result
    except __HOLE__ as e:
        msg = '{} is not true'.format(check.__name__)
        e.args = (msg, df)
        raise
    return df
dataset/ETHPy150Open TomAugspurger/engarde/engarde/generic.py/verify