def mutual_info_run_check(when, then, df):
    """
    Check for consistency between parameters and the dataframe, an assertion
    error will incur if the check is not passed.

    :param when: First column on which to run the metric
    :type when: str/int
    :param then: Second column on which to run the metric
    :type then: str/int
    :param df: Dataframe on which to run the metric
    :type df: DataFrame
    """
    assert when in df.columns, "Column '%s' is not a column part of the dataframe" % when
    assert then in df.columns, "Column '%s' is not a column part of the dataframe" % then
    assert when != then, 'When and then must differ'
