def METHOD_NAME(self, node):
    ancestor = self.ancestors[node][-1]
    if getattr(ancestor, 'body', ()) == [node]:
        return node
    if getattr(ancestor, 'orelse', ()) == [node]:
        return node
    if metadata.get(node, OMPDirective):
        return node
    return None