nodes: 0, module; 1, function_definition; 2, function_name:sort_generators; 3, parameters; 4, block; 5, identifier:self; 6, expression_statement; 7, expression_statement; 8, comment:""" Reorders the list of generators according to bus index.
          """; 9, call; 10, attribute; 11, argument_list; 12, attribute; 13, identifier:sort; 14, keyword_argument; 15, identifier:self; 16, identifier:generators; 17, identifier:key; 18, lambda; 19, lambda_parameters; 20, attribute; 21, identifier:gn; 22, attribute; 23, identifier:_i; 24, identifier:gn; 25, identifier:bus
code: def sort_generators(self):
          """ Reorders the list of generators according to bus index.
          """
          self.generators.sort(key=lambda gn: gn.bus._i)