Utilities and helper functions that won’t produce circular imports.
This is a simplified inspect.getcallargs (2.7+).
It should be replaced when python >= 2.7 is standard.
This method can only properly grab arguments which are passed in as keyword arguments, or given names by the method being called. This means that an *arg in a method signature and any arguments captured by it will be left out of the results.