As requested by @tvdstorm I've translated my suggestion to an issue. From the function value you can extract the module where it was defined. This makes the code less brittle, and also more clearly documents the relationship.