def get_wrapping_class(node):
klass = node.frame()<EOL>while klass is not None and not isinstance(klass, ClassDef):<EOL><INDENT>if klass.parent is None:<EOL><INDENT>klass = None<EOL><DEDENT>else:<EOL><INDENT>klass = klass.parent.frame()<EOL><DEDENT><DEDENT>return klass<EOL>
Get the class that wraps the given node.

    We consider that a class wraps a node if the class
    is a parent for the said node.

    :returns: The class that wraps the given node
    :rtype: ClassDef or None