Getting the context in which a function is running?