'Find the __docformat__ closest to this node (i.e., look in the
class or module)'

def find_docformat(self, node):

    while node:
        if node.get('docformat'):
            return node['docformat']
        node = node.parent
    return self.default_parser
