class_docstr: Base class for all step decorators.
  
  Example:
  
  @my_decorator
  @step
  def a(self):
      pass
  
  @my_decorator
  @step
  def b(self):
      pass
  
  To make the above work, define a subclass
  
  class MyDecorator(StepDecorator):
      name = "my_decorator"
  
  and include it in plugins.STEP_DECORATORS. Now both a() and b()
  get an instance of MyDecorator, so you can keep step-specific
  state easily.
  
  TODO (savin): Initialize the decorators with flow, graph,
                step.__name__ etc., so that we don't have to
                pass them around with every lifecycle call.
class_docstr_tok: ["Base","class","for","all","step","decorators",".","Example",":","@","my_decorator","@","step","def","a","(","self",")",":","pass","@","my_decorator","@","step","def","b","(","self",")",":","pass","To","make","the","above","work",",","define","a","subclass","class","MyDecorator","(","StepDecorator",")",":","name","=","``","my_decorator","''","and","include","it","in","plugins.STEP_DECORATORS",".","Now","both","a","(",")","and","b","(",")","get","an","instance","of","MyDecorator",",","so","you","can","keep","step-specific","state","easily",".","TODO","(","savin",")",":","Initialize","the","decorators","with","flow",",","graph",",","step.__name__","etc.",",","so","that","we","do","n't","have","to","pass","them","around","with","every","lifecycle","call","."]
docstr: Run if the step function raised an exception in the task context.
  
  If this method returns True, it is assumed that the exception has
  been taken care of and the flow may continue.
code: def task_exception(
      self,
      exception,
      step_name,
      flow,
      graph,
      retry_count,
      max_user_code_retries,
  ):
      """
      Run if the step function raised an exception in the task context.
  
      If this method returns True, it is assumed that the exception has
      been taken care of and the flow may continue.
      """
      pass
  
imports: from functools import partial
  import json
  import re
  import os
  import sys
  from .flowspec import FlowSpec
  from .exception import MetaflowInternalError, MetaflowException, InvalidDecoratorAttribute
  from metaflow._vendor import click
label_desc: Use image node_id 12 for calling the StepDecorator obj's underlying member method code with example usage: obj.task_exception(exception, step_name, flow, graph, retry_count, max_user_code_retries) without return types