code: def _val_wrapper(f):
      def wrapped(self, val=None):
          if val is None:
              return f(self, self)
          else:
              return f(self, val)
  
      return wrapped
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import tensorflow
  from edward.models.random_variables import *
label_desc: Use image node_id 1 for calling a global function with example usage: _val_wrapper(f) and returns: wrapped, f, f