nodes: 0, module; 1, function_definition; 2, function_name:sort; 3, parameters; 4, type; 5, block; 6, typed_parameter; 7, generic_type; 8, expression_statement; 9, return_statement; 10, identifier:records; 11, type; 12, identifier:List; 13, type_parameter; 14, string:"Sort records into a canonical order, suitable for comparison."; 15, call; 16, generic_type; 17, type; 18, identifier:sorted; 19, argument_list; 20, identifier:Sequence; 21, type_parameter; 22, identifier:Record; 23, identifier:records; 24, keyword_argument; 25, type; 26, identifier:key; 27, identifier:_record_key; 28, identifier:Record
code: def sort(records: Sequence[Record]) -> List[Record]:
      "Sort records into a canonical order, suitable for comparison."
      return sorted(records, key=_record_key)