code: def sort(records: Sequence[Record]) -> List[Record]:
      "Sort records into a canonical order, suitable for comparison."
      return sorted(records, key=_record_keyf sort(records: Sequence[Record]) -> List[Record]:
      "Sort records into a canonical order, suitable for comparison."
      return sorted(records, key=_record_key)
docs: Sort records into a canonical order, suitable for comparison.