def no_stacktrace_for(exception_type):
    """
    Suppress stack trace for exceptions of exception_type on the
    method.
    """

    def decorator(step_function):
        if not hasattr(step_function, "_expected_exceptions"):
            step_function._expected_exceptions = [exception_type]
        else:
            step_function._expected_exceptions.append(exception_type)
        return step_function

    return decorator