def str_sorted(seq: Sequence[T], skips: Set[str]) -> Sequence[T]:
    """Return a sorted version of `seq` by string order.

    Items are converted to strings using `canonical` with `skips`
    keys/attributes skipped.

    Args:
        seq: The sequence to sort.

        skips: The keys/attributes to skip for string conversion.
    """

    objs_and_strs = [(o, str(canonical(o, skips=skips))) for o in seq]
    objs_and_strs_sorted = sorted(objs_and_strs, key=lambda x: x[1])

    return [o for o, _ in objs_and_strs_sorted]
Return a sorted version of `seq` by string order.

    Items are converted to strings using `canonical` with `skips`
    keys/attributes skipped.

    Args:
        seq: The sequence to sort.

        skips: The keys/attributes to skip for string conversion.
    
tests/test.py