code: def _try_call(fn, args, kwargs):
      """Convenience function for evaluating argument `fn`."""
      try:
          if fn is None:
              return args[0]
          try:
              return fn(*args, **kwargs)
          except TypeError:
              # Don't return from here or else we'll pick up a nested exception.
              # Seeing TypeError here isn't really an exception since it only means we
              # need to call `fn` differently).
              pass
          return fn(*args)
      except:
          print(
              "------ EXCEPTION in {} ------".format(_try_get_name(fn))
          )
          raise
  
imports: import sys
  import tensorflow.compat.v2
  from tensorflow_probability.python.experimental.nn.util import utils
  from tensorflow_probability.python.internal import name_util
label_desc: Use image node_id 1 for calling a global function with example usage: _try_call(fn, args, kwargs) and returns: fn, args, fn