code: def _defer(fn, name=None, reverse=False):
      """Wraps `fn` by instead calling `self.__action__`."""
      if name is None:
          name = fn.__name__
          if not name.startswith("__"):
              name = "__" + name
          if not name.endswith("__"):
              name = name + "__"
      if reverse:
          fn = _reverse(fn)
          if name.startswith("__"):
              name = "__r" + name[2:]
          else:
              name = "r" + name
  
      @functools.wraps(fn)
      def _wrapped_fn(self, *args, **kwargs):
          return self.__action__(fn, *args, _action_name=name, **kwargs)
  
      return _wrapped_fn
  
imports: import builtins
  import functools
  import math
  import operator
  import sys
  import tensorflow.compat.v2
label_desc: Use image node_id 2 for calling a global function with example usage: _defer(fn, name, reverse) and returns: _wrapped_fn, self