sig = inspect.signature(test)
{name: param.default for name, param in list(sig.parameters.items()) if not param
    .default is param.empty}
How can I access the default value for a keyword argument in Python?