def METHOD_NAME(self, n):
    k = n.kind
    if k == 'operator':
        self._visitnode(n, n.op)
    elif k == 'list':
        dochild = self._visitnode(n, n.parts)
        if dochild is None or dochild:
            for child in n.parts:
                self.METHOD_NAME(child)
    elif k == 'reservedword':
        self._visitnode(n, n.word)
    elif k == 'pipe':
        self._visitnode(n, n.pipe)
    elif k == 'pipeline':
        dochild = self._visitnode(n, n.parts)
        if dochild is None or dochild:
            for child in n.parts:
                self.METHOD_NAME(child)
    elif k == 'compound':
        dochild = self._visitnode(n, n.list, n.redirects)
        if dochild is None or dochild:
            for child in n.list:
                self.METHOD_NAME(child)
            for child in n.redirects:
                self.METHOD_NAME(child)
    elif k in ('if', 'for', 'while', 'until'):
        dochild = self._visitnode(n, n.parts)
        if dochild is None or dochild:
            for child in n.parts:
                self.METHOD_NAME(child)
    elif k == 'command':
        dochild = self._visitnode(n, n.parts)
        if dochild is None or dochild:
            for child in n.parts:
                self.METHOD_NAME(child)
    elif k == 'function':
        dochild = self._visitnode(n, n.name, n.body, n.parts)
        if dochild is None or dochild:
            for child in n.parts:
                self.METHOD_NAME(child)
    elif k == 'redirect':
        dochild = self._visitnode(n, n.input, n.type, n.output, n.heredoc)
        if dochild is None or dochild:
            if isinstance(n.output, node):
                self.METHOD_NAME(n.output)
            if n.heredoc:
                self.METHOD_NAME(n.heredoc)
    elif k in ('word', 'assignment'):
        dochild = self._visitnode(n, n.word)
        if dochild is None or dochild:
            for child in n.parts:
                self.METHOD_NAME(child)
    elif k in ('parameter', 'tilde', 'heredoc'):
        self._visitnode(n, n.value)
    elif k in ('commandsubstitution', 'processsubstitution'):
        dochild = self._visitnode(n, n.command)
        if dochild is None or dochild:
            self.METHOD_NAME(n.command)
    else:
        raise ValueError('unknown node kind %r' % k)
    self.visitnodeend(n)