<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_all_styles(document, style):
 """Returns list of styles on which specified style is based on. :Args: - document (:class:`ooxml.doc.Document`):
 Document object - style (:class:`ooxml.doc.Style`):
 Style object :Returns: List of style objects. """


    classes = []

    while True:
        classes.insert(0, get_style_name(style))

        if style.based_on:
            style = document.styles.get_by_id(style.based_on)
        else:
            break

    return classes