I'd prefer to keep the function in the same file as the routines it is needed for.
The reason why it's necessary should be mentioned, though.