def METHOD_NAME(self, node: ASTNode):
    """
    Visits each kernel and checks if it is used correctly.
    :param node: a single node.
    """
    for kernelName in self.__kernels:
        # in order to allow shadowing by local scopes, we first check if the element has been declared locally
        symbol = node.get_scope().resolve_to_symbol(kernelName, SymbolKind.VARIABLE)
        # if it is not a kernel just continue
        if symbol is None:
            if not isinstance(node, ASTExternalVariable):
                code, message = Messages.get_no_variable_found(kernelName)
                Logger.log_message(node=self.__neuron_node, code=code, message=message, log_level=LoggingLevel.ERROR)
            continue
        if not symbol.is_kernel():
            continue
        if node.get_complete_name() == kernelName:
            parent = self.__neuron_node.get_parent(node)
            if parent is not None:
                if isinstance(parent, ASTKernel):
                    continue
                grandparent = self.__neuron_node.get_parent(parent)
                if grandparent is not None and isinstance(grandparent, ASTFunctionCall):
                    grandparent_func_name = grandparent.get_name()
                    if grandparent_func_name == 'convolve':
                        continue
            code, message = Messages.get_kernel_outside_convolve(kernelName)
            Logger.log_message(code=code,
                               message=message,
                               log_level=LoggingLevel.ERROR,
                               error_position=node.get_source_position())