This might seem pretty silly, but maybe move this helper method to the `utils` file, and write a couple tests.