def warn_about_none_ast(self, node, module_path, lineno):
<EOL>AST_NONE = ast.parse("<STR_LIT:None>").body[<NUM_LIT:0>].value<EOL>val_is_none = ast.Compare(node, [ast.Is()], [AST_NONE])<EOL>send_warning = ast.parse(<EOL>"""<STR_LIT>""".format(<EOL>filename=module_path.strpath, lineno=lineno<EOL>)<EOL>).body<EOL>return ast.If(val_is_none, send_warning, [])<EOL>
Returns an AST issuing a warning if the value of node is `None`.
This is used to warn the user when asserting a function that asserts
internally already.
See issue #3191 for more details.