Either way is fine, both have advantages. Putting these statements in the main file gives the reader of the code an overview of all namespace management, while putting them where they are used keeps things together.
Most packages do the first, but don’t worry too much about these things, just keep coding, you can always change these things trivially.