nodes: 0, module; 1, function_definition; 2, function_name:logs; 3, parameters; 4, block; 5, identifier:self; 6, expression_statement; 7, if_statement; 8, expression_statement; 9, expression_statement; 10, return_statement; 11, comment:"""Find the log directory and return all the logs sorted."""; 12, not_operator; 13, block; 14, assignment; 15, call; 16, identifier:logs; 17, attribute; 18, expression_statement; 19, identifier:logs; 20, attribute; 21, attribute; 22, argument_list; 23, attribute; 24, identifier:loaded; 25, call; 26, attribute; 27, identifier:flat_directories; 28, identifier:logs; 29, identifier:sort; 30, keyword_argument; 31, identifier:self; 32, identifier:parent; 33, attribute; 34, argument_list; 35, attribute; 36, identifier:logs_dir; 37, identifier:key; 38, lambda; 39, attribute; 40, identifier:load; 41, attribute; 42, identifier:p; 43, lambda_parameters; 44, attribute; 45, identifier:self; 46, identifier:parent; 47, identifier:self; 48, identifier:parent; 49, identifier:x; 50, identifier:x; 51, identifier:mod_time
code: def logs(self):
          """Find the log directory and return all the logs sorted."""
          if not self.parent.loaded: self.parent.load()
          logs = self.parent.p.logs_dir.flat_directories
          logs.sort(key=lambda x: x.mod_time)
          return logs