docs: def _get_arg_spec(func):
          """
          Gets the argument spec of the given function, returning defaults as a dict of param names to values
          """
          args, varargs, keywords, defaults = inspect.getargspec(func)
  
          # build a mapping from argument names to their default values, if any:
          if defaults is None:
              defaults = {}
          else:
              defaulted_args = args[-len(defaults):]
              defaults = {name: val for name, val in zip(defaulted_args, defaults)}
  
          return args, varargs, defaults