def METHOD_NAME(formula):
    """
    A check to detect the comparison of different data types. This function
    replaces equality comparisons with order comparisons to check whether
    any variables of different types are compared. From Python 3.6 documentation:
    A default order comparison (<, >, <=, and >=) is not provided; an attempt
    raises TypeError. A motivation for this default behavior is the lack of a
    similar invariant as for equality.
    Parameters
    ----------
    formula: str
        formula to check if it includes comparisons of different data types
    Returns
    -------
    True (or raises TypeError)
    Example
    -------
    >>> _check_comparison_types("3.1 > 3")
    True
    >>> _check_comparison_types("'3.1' == 3.1")
    Traceback (most recent call last):
    ...
    TypeError: The following formula may be comparing different types of variables: '3.1' == 3.1
    """
    guard_test = formula.replace("==", ">").replace("!=", ">").replace("<>", ">")
    try:
        eval(guard_test)
    except TypeError as type_error:
        raise TypeError(
            "The following formula may be comparing different types of variables: {}".format(
                formula
            )
        ) from type_error
    return True