code: def parameterized_argument_value_pairs(func, p):
      """Return tuples of parameterized arguments and their values.
  
      This is useful if you are writing your own doc_func
      function and need to know the values for each parameter name::
  
          >>> def func(a, foo=None, bar=42, **kwargs): pass
          >>> p = param(1, foo=7, extra=99)
          >>> parameterized_argument_value_pairs(func, p)
          [("a", 1), ("foo", 7), ("bar", 42), ("**kwargs", {"extra": 99})]
  
      If the function's first argument is named ``self`` then it will be
      ignored::
  
          >>> def func(self, a): pass
          >>> p = param(1)
          >>> parameterized_argument_value_pairs(func, p)
          [("a", 1)]
  
      Additionally, empty ``*args`` or ``**kwargs`` will be ignored::
  
          >>> def func(foo, *args): pass
          >>> p = param(1)
          >>> parameterized_argument_value_pairs(func, p)
          [("foo", 1)]
          >>> p = param(1, 16)
          >>> parameterized_argument_value_pairs(func, p)
          [("foo", 1), ("*args", (16, ))]
      """
      argspec = inspect.getargspec(func)
      arg_offset = 1 if argspec.args[:1] == ["self"] else 0
  
      named_args = argspec.args[arg_offset:]
  
      result = lzip(named_args, p.args)
      named_args = argspec.args[len(result) + arg_offset :]
      varargs = p.args[len(result) :]
  
      result.extend(
          [
              (name, p.kwargs.get(name, default))
              for (name, default) in zip(
                  named_args, argspec.defaults or []
              )
          ]
      )
  
      seen_arg_names = {n for (n, _) in result}
      keywords = QuietOrderedDict(
          sorted(
              [
                  (name, p.kwargs[name])
                  for name in p.kwargs
                  if name not in seen_arg_names
              ]
          )
      )
  
      if varargs:
          result.append(("*%s" % (argspec.varargs,), tuple(varargs)))
  
      if keywords:
          result.append(("**%s" % (argspec.keywords,), keywords))
  
      return result
  
imports: import re
  import sys
  import inspect
  import warnings
  from functools import wraps
  from types import MethodType
  from collections import namedtuple
  from unittest import TestCase
label_desc: Use image node_id 1 for calling a global function with example usage: parameterized_argument_value_pairs(func, p) and returns: result