@utils.check_messages('return-outside-function')
def visit_return(self, node):
    if (not isinstance(node.frame(), astroid.FunctionDef)):
        self.add_message('return-outside-function', node=node)
@utils.check_messages('return-outside-function')
def visit_return(self, node):
    if (not isinstance(node.frame(), astroid.FunctionDef)):
        self.add_message('return-outside-function', node=node)