this makes sense, but I would probably keep it inside same file that uses it (if you extract helper into another module). It only makes sense to keep it as a separate file if it is used in multiple places; and using it in multiple places, means there is duplication.