python function introspection (work in progress)