nodes: 0, module; 1, function_definition; 2, function_name:aos_as_list; 3, parameters; 4, block; 5, identifier:self; 6, expression_statement; 7, return_statement; 8, string; 9, call; 10, string_content:Returns a list of atomic orbitals, sorted from lowest to highest energy; 11, identifier:sorted; 12, argument_list; 13, call; 14, keyword_argument; 15, attribute; 16, argument_list; 17, identifier:key; 18, lambda; 19, identifier:chain; 20, identifier:from_iterable; 21, list_comprehension; 22, lambda_parameters; 23, subscript; 24, binary_operator:self.aos[el] * int(self.composition[el]); 25, for_in_clause; 26, identifier:x; 27, identifier:x; 28, integer:2; 29, subscript; 30, call; 31, identifier:el; 32, attribute; 33, attribute; 34, identifier:el; 35, identifier:int; 36, argument_list; 37, identifier:self; 38, identifier:elements; 39, identifier:self; 40, identifier:aos; 41, subscript; 42, attribute; 43, identifier:el; 44, identifier:self; 45, identifier:composition
code: def aos_as_list(self):
          '''
          Returns a list of atomic orbitals, sorted from lowest to highest energy
          '''
          return sorted(chain.from_iterable(
              [self.aos[el] * int(self.composition[el]) for el in self.elements]
          ), key=lambda x: x[2])