Recursively sorts dict keys to get consistent ordering for comparison.
Lists, tuples, and other types are returned unchanged (except their contents
get sorted recursively if they are dicts).
- Parameters:
obj (Any) – Any nested structure (dict, list, tuple, or other).
- Returns:
A new structure with dict keys sorted recursively.
- Return type:
Any