docs: def func_args_as_dict(func, args, kwargs):
      """
      Return given function's positional and key value arguments as an ordered
      dictionary.
      """
      if six.PY2:
          _getargspec = inspect.getargspec
      else:
          _getargspec = inspect.getfullargspec
  
      arg_names = list(
          OrderedDict.fromkeys(
              itertools.chain(
                  _getargspec(func)[0],
                  kwargs.keys()
              )
          )
      )
      return OrderedDict(
          list(six.moves.zip(arg_names, args)) +
          list(kwargs.items())
      )