Can you move this function to the `parser.py` module?