I would move this definition to modules/generic and import it to avoid repeating in 3 places