You may provide a register_to keyword parameter as a way to access a registry. This register_to object must have a _registry instance variable to access it.
Raise ValueError otherwise, e.g. for namespace packages that are split over several directories.