<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_directive(self, directive):
 # type: (Directive) -> 'ResponseFactory' """Adds directive to response. :param directive: the directive sent back to Alexa device. :type directive: ask_sdk_model.directive.Directive :return: response factory with partial response being built and access from self.response. :rtype: ResponseFactory """

        if self.response.directives is None:
            self.response.directives = []

        if (directive is not None and
                directive.object_type == "VideoApp.Launch"):
            self.response.should_end_session = None
        self.response.directives.append(directive)
        return self