can't this entire `if` block be replaced with 'out[k] = recursive_asdict(item)` ?