code: def _with_function_called_after(
      original_function, method_called_after
  ):
      @functools.wraps(original_function)
      def run(self, *args, **kwargs):
          result = original_function(self, *args, **kwargs)
          method_called_after(self)
          return result
  
      return run
  
imports: import functools
  from .publish import *
  from .deploy import *
  from h2o.estimators.estimator_base import H2OEstimator
  from h2o.grid.grid_search import H2OGridSearch
  from h2o.automl import H2OAutoML
label_desc: Use image node_id 1 for calling a global function with example usage: _with_function_called_after(original_function, method_called_after) and returns: run, result