https://github.com/LightForm-group/damask-parse/blob/2a08ffda8b23fe2e36189fe5827611267483351c/damask_parse/utils.py#L496