code: def _get_arg_value(arg_name, f, kwargs):
      """Attempts to infer arg's value within the scope created by `f(**kwargs)`."""
      if arg_name in kwargs:
          return kwargs[arg_name]
      argspec = tf_inspect.getfullargspec(f)
      if arg_name in argspec.args:
          return argspec.defaults[
              # Index from the right (with a negative index) since only a suffix of
              # args have defaults.
              argspec.args.index(arg_name)
              - len(argspec.args)
          ]
      return (argspec.kwonlydefaults or {}).get(arg_name)
  
file_path: probability/tensorflow_probability/python/experimental/util/trainable.py
imports: import functools
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import docstring_util
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import trainable_state_util
  from tensorflow.python.util import tf_inspect
label_desc: Use image node_id 1 for calling a global function with example usage: _get_arg_value(arg_name, f, kwargs) and returns: unknown, kwargs, argspec