I couldn't find anything about .apy, but I did find the .pyd. Apparently, the .pyd is the same thing as a .dll file. If you know about programming, you could almost compare them to using an include statement in a program. When you compile a Python script (ie, to make a distributable binary), those .pyd files are created, most likely including functions you've imported from other .py files in one of your own programs, or the standard library.
If the functions you've seen aren't defined in the script itself, then it was probably imported from another Python file. All you'll have to do is read the [b] import statements, and find which imported file had that function. I'm not incredibly good at Python yet, so there may be some way to use the Python interpreter itself to determine where that function came from. You might want to check www.python.org documentation, or ask one of their mailing lists, for more information about that.