# Path: jasper/utility.py
# def extract_traceback(exception):
#     """
#     Utility function for extracting the traceback from an exception.
# 
#     :param exception: The exception to extract the traceback from.
#     :return: The extracted traceback.
#     """
#     return ''.join(traceback.format_tb(exception.__traceback__))


from jasper.utility import extract_traceback
from termcolor import colored
import textwrap
import colorama
import sys
                self.indentation_level -= 4

    def prepare_step(self, step, step_name):
        """
        Prepare a Step object to be displayed.

        :param step: The Step to prepare.
        :param step_name: A name to represent the step with.
        """
        if not step.ran:
            color = self.grey
        elif step.passed:
            color = self.cyan
        else:
            color = self.red

        self.__push_to_display(color(f"{step_name}: "
                                     f"{step.function.__name__} {step.kwargs if step.kwargs else ''}"))

    def prepare_exception(self, exception):
        """
        Prepare an exception to be displayed.

        :param exception: The exception to prepare.
        """
        if str(exception):
            exception_string = f'{str(exception)}\n'
        else:
            exception_string = f'{exception.__class__.__name__}\n'


# Path: jasper/utility.py
# def extract_traceback(exception):
#     """
#     Utility function for extracting the traceback from an exception.
# 
#     :param exception: The exception to extract the traceback from.
#     :return: The extracted traceback.
#     """
#     return ''.join(traceback.format_tb(exception.__traceback__))


# Path: jasper/display.py
from jasper.utility import extract_traceback
from termcolor import colored
import textwrap
import colorama
import sys

                self.indentation_level -= 4

    def prepare_step(self, step, step_name):
        """
        Prepare a Step object to be displayed.

        :param step: The Step to prepare.
        :param step_name: A name to represent the step with.
        """
        if not step.ran:
            color = self.grey
        elif step.passed:
            color = self.cyan
        else:
            color = self.red

        self.__push_to_display(color(f"{step_name}: "
                                     f"{step.function.__name__} {step.kwargs if step.kwargs else ''}"))

    def prepare_exception(self, exception):
        """
        Prepare an exception to be displayed.

        :param exception: The exception to prepare.
        """
        if str(exception):
            exception_string = f'{str(exception)}\n'
        else:
            exception_string = f'{exception.__class__.__name__}\n'


        traceback_string = f'{extract_traceback(exception)}'