<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_template(self, template):
 """ Sets template to be used when generating output :param template TEmplate instance :type instance of BasicTemplate """

        if isinstance(template, templates.BasicTemplate):
            self.template = template
        else:
            raise TypeError('converter#set_template:'
                            'Template must inherit from BasicTemplate')