Instead of throwing `RecursionError` please add a default depth for example: 2nd level or 3rd level Using just `RECURSION_DEPTH : 2` as a global variable and should be modifiable inside the model or during `.to_dict(depth=2)`