def _check_nan_comparison(self, left_value, right_value, root_node, checking_for_absence: bool=False):

    def _is_float_nan(node):
        try:
            if (isinstance(node, astroid.Call) and (len(node.args) == 1)):
                if ((node.args[0].value.lower() == 'nan') and (node.inferred()[0].pytype() == 'builtins.float')):
                    return True
            return False
        except AttributeError:
            return False

    def _is_numpy_nan(node):
        if (isinstance(node, astroid.Attribute) and (node.attrname == 'NaN')):
            if isinstance(node.expr, astroid.Name):
                return (node.expr.name in ('numpy', 'nmp', 'np'))
        return False

    def _is_nan(node) -> bool:
        return (_is_float_nan(node) or _is_numpy_nan(node))
    nan_left = _is_nan(left_value)
    if ((not nan_left) and (not _is_nan(right_value))):
        return
    absence_text = ''
    if checking_for_absence:
        absence_text = 'not '
    if nan_left:
        suggestion = f"'{absence_text}math.isnan({right_value.as_string()})'"
    else:
        suggestion = f"'{absence_text}math.isnan({left_value.as_string()})'"
    self.add_message('nan-comparison', node=root_node, args=(f"'{root_node.as_string()}'", suggestion))
def _check_nan_comparison(self, left_value, right_value, root_node, checking_for_absence: bool=False):

    def _is_float_nan(node):
        try:
            if (isinstance(node, astroid.Call) and (len(node.args) == 1)):
                if ((node.args[0].value.lower() == 'nan') and (node.inferred()[0].pytype() == 'builtins.float')):
                    return True
            return False
        except AttributeError:
            return False

    def _is_numpy_nan(node):
        if (isinstance(node, astroid.Attribute) and (node.attrname == 'NaN')):
            if isinstance(node.expr, astroid.Name):
                return (node.expr.name in ('numpy', 'nmp', 'np'))
        return False

    def _is_nan(node) -> bool:
        return (_is_float_nan(node) or _is_numpy_nan(node))
    nan_left = _is_nan(left_value)
    if ((not nan_left) and (not _is_nan(right_value))):
        return
    absence_text = 
    if checking_for_absence:
        absence_text = 'not '
    if nan_left:
        suggestion = f"'{absence_text}math.isnan({right_value.as_string()})'"
    else:
        suggestion = f"'{absence_text}math.isnan({left_value.as_string()})'"
    self.add_message('nan-comparison', node=root_node, args=(f"'{root_node.as_string()}'", suggestion))