def get_ancestor_class_names(mention):
span = _to_span(mention)<EOL>class_names = []<EOL>i = _get_node(span.sentence)<EOL>while i is not None:<EOL><INDENT>class_names.insert(<NUM_LIT:0>, str(i.get("<STR_LIT:class>")))<EOL>i = i.getparent()<EOL><DEDENT>return class_names<EOL>
Return the HTML classes of the Mention's ancestors.

    If a candidate is passed in, only the ancestors of its first Mention are
    returned.

    :param mention: The Mention to evaluate
    :rtype: list of strings