nodes: 0, module; 1, function_definition; 2, function_name:_sort_row_col; 3, parameters; 4, type; 5, block; 6, typed_parameter; 7, generic_type; 8, expression_statement; 9, return_statement; 10, identifier:qubits; 11, type; 12, identifier:List; 13, type_parameter; 14, comment:"""Sort grid qubits first by row then by column"""; 15, call; 16, generic_type; 17, type; 18, identifier:sorted; 19, argument_list; 20, identifier:Iterator; 21, type_parameter; 22, identifier:GridQubit; 23, identifier:qubits; 24, keyword_argument; 25, type; 26, identifier:key; 27, lambda; 28, identifier:GridQubit; 29, lambda_parameters; 30, tuple; 31, identifier:x; 32, attribute; 33, attribute; 34, identifier:x; 35, identifier:row; 36, identifier:x; 37, identifier:col
code: def _sort_row_col(qubits: Iterator[GridQubit]) -> List[GridQubit]:
      """Sort grid qubits first by row then by column"""
  
      return sorted(qubits, key=lambda x: (x.row, x.col))