Bash does not have a way of determining where environment variables or functions were defined in the initialization process.
Otherwise, you can get is running bash with -x.

bash -x -i -l

This will execute an interactive login shell in debug mode, which will show every line executed. If you find the function definition in the output, you can then find the last source or . command that came before it.