def METHOD_NAME(self) -> None:
    # as there is a separate stack push & pop operation management, if stack is empty,
    # it should be the scenario that user call `set_pipeline_settings` out of `pipeline` decorator,
    # then directly raise user error.
    if len(self._stack) == 0:
        error_message = "Please call `set_pipeline_settings` inside a `pipeline` decorated function."
        raise UserErrorException(
            message=error_message,
            no_personal_data_message=error_message,
        )