# Path: sismic/helpers.py
# def log_trace(interpreter: Interpreter) -> List[MacroStep]:
#     """
#     Return a list that will be populated by each value returned by the *execute_once* method
#     of given interpreter.
# 
#     :param interpreter: an *Interpreter* instance
#     :return: a list of *MacroStep*
#     """
#     func = interpreter.execute_once
#     trace = []
# 
#     @wraps(func)
#     def new_func():
#         step = func()
#         if step:
#             trace.append(step)
#         return step
# 
#     interpreter.execute_once = new_func  # type: ignore
#     return trace


from sismic.helpers import log_trace
            import ipdb as pdb
            import pdb


def before_scenario(context, scenario):
    # Create interpreter
    statechart = context.config.userdata.get('statechart')
    interpreter_klass = context.config.userdata.get('interpreter_klass')
    context.interpreter = interpreter_klass(statechart)

    # Log trace

# Path: sismic/helpers.py
# def log_trace(interpreter: Interpreter) -> List[MacroStep]:
#     """
#     Return a list that will be populated by each value returned by the *execute_once* method
#     of given interpreter.
# 
#     :param interpreter: an *Interpreter* instance
#     :return: a list of *MacroStep*
#     """
#     func = interpreter.execute_once
#     trace = []
# 
#     @wraps(func)
#     def new_func():
#         step = func()
#         if step:
#             trace.append(step)
#         return step
# 
#     interpreter.execute_once = new_func  # type: ignore
#     return trace


# Path: sismic/bdd/environment.py
from sismic.helpers import log_trace
            import ipdb as pdb
            import pdb



def before_scenario(context, scenario):
    # Create interpreter
    statechart = context.config.userdata.get('statechart')
    interpreter_klass = context.config.userdata.get('interpreter_klass')
    context.interpreter = interpreter_klass(statechart)

    # Log trace

    context.trace = log_trace(context.interpreter)