nodes: 0, module; 1, function_definition; 2, function_name:get_token_ids; 3, parameters; 4, block; 5, identifier:tree; 6, expression_statement; 7, function_definition; 8, expression_statement; 9, return_statement; 10, comment:"""
          returns a list of all token IDs occuring the the given exmaralda file,
          sorted by their time stamp in ascending order.
          """; 11, function_name:tok2time; 12, parameters; 13, block; 14, assignment; 15, generator_expression; 16, identifier:token_element; 17, expression_statement; 18, return_statement; 19, identifier:timeline; 20, call; 21, subscript; 22, for_in_clause; 23, string; 24, call; 25, attribute; 26, argument_list; 27, attribute; 28, string; 29, identifier:tok; 30, call; 31, string_content:extracts the time (float) of a <tli> element
              (i.e. the absolute position of a token in the document); 32, identifier:float; 33, argument_list; 34, identifier:tree; 35, identifier:find; 36, string; 37, identifier:tok; 38, identifier:attrib; 39, string_content:id; 40, identifier:sorted; 41, argument_list; 42, subscript; 43, string_content://common-timeline; 44, generator_expression; 45, keyword_argument; 46, attribute; 47, string; 48, identifier:tli; 49, for_in_clause; 50, identifier:key; 51, identifier:tok2time; 52, identifier:token_element; 53, identifier:attrib; 54, string_content:time; 55, identifier:tli; 56, call; 57, attribute; 58, argument_list; 59, identifier:timeline; 60, identifier:iterchildren
code: 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))