<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_token_ids(tree):
 """ returns a list of all token IDs occuring the the given exmaralda file, sorted by their time stamp in ascending order. """

        def tok2time(token_element):
            '''
            extracts the time (float) of a <tli> element
            (i.e. the absolute position of a token in the document)
            '''
            return float(token_element.attrib['time'])

        timeline = tree.find('//common-timeline')
        return (tok.attrib['id']
                for tok in sorted((tli for tli in timeline.iterchildren()),
                                  key=tok2time))