code: def failfast(method):
      @wraps(method)
      def inner(self, *args, **kw):
          if getattr(self, "failfast", False):
              self.stop()
          return method(self, *args, **kw)
  
      return inner
  
imports: import io
  import sys
  import traceback
  from .None import util
  from functools import wraps
label_desc: Use image node_id 1 for calling a global function with example usage: failfast(method) and returns: inner, method