<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getTemplates(self, workitems, template_folder=None, template_names=None, keep=False, encoding="UTF-8"):
 """Get templates from a group of to-be-copied workitems and write them to files named after the names in `template_names` respectively. More details, please refer to :class:`rtcclient.template.Templater.getTemplates` """


        self.templater.getTemplates(workitems,
                                    template_folder=template_folder,
                                    template_names=template_names,
                                    keep=keep,
                                    encoding=encoding)