nodes: 0, module; 1, function_definition; 2, function_name:_sort_lines; 3, parameters; 4, block; 5, identifier:self; 6, expression_statement; 7, expression_statement; 8, comment:"""Haproxy writes its logs after having gathered all information
          related to each specific connection. A simple request can be
          really quick but others can be really slow, thus even if one connection
          is logged later, it could have been accepted before others that are
          already processed and logged.
  
          This method sorts all valid log lines by their acceptance date,
          providing the real order in which connections where made to the server.
          """; 9, assignment; 10, attribute; 11, call; 12, identifier:self; 13, identifier:_valid_lines; 14, identifier:sorted; 15, argument_list; 16, attribute; 17, keyword_argument; 18, identifier:self; 19, identifier:_valid_lines; 20, identifier:key; 21, lambda; 22, lambda_parameters; 23, attribute; 24, identifier:line; 25, identifier:line; 26, identifier:accept_date
code: def _sort_lines(self):
          """Haproxy writes its logs after having gathered all information
          related to each specific connection. A simple request can be
          really quick but others can be really slow, thus even if one connection
          is logged later, it could have been accepted before others that are
          already processed and logged.
  
          This method sorts all valid log lines by their acceptance date,
          providing the real order in which connections where made to the server.
          """
          self._valid_lines = sorted(
              self._valid_lines,
              key=lambda line: line.accept_date,
          )