Move to_dict logic into module_utils/rax.py