code: def call_fn(fn, args):
      """Calls `fn` with `args`, possibly expanding `args`.
  
      Use this function when calling a user-provided callable using user-provided
      arguments.
  
      The expansion rules are as follows:
  
      `fn(*args)` if `args` is a `list` or a `tuple`, but not a `namedtuple`.
      `fn(**args)` if `args` is a `dict`.
      `fn(args)` otherwise.
  
      Args:
        fn: A callable that takes either `args` as an argument(s).
        args: Arguments to `fn`.
  
      Returns:
        result: Return value of `fn`.
      """
  
      if expand_as_args(args):
          return fn(*args)
      elif _expand_as_kwargs(args):
          return fn(**args)
      else:
          return fn(args)
  
imports: import collections
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow.python.util import nest
label_desc: Use image node_id 13 for calling a global function with example usage: call_fn(fn, args) and returns: fn, fn, fn