<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _TemplateNamesToFiles(self, template_str):
 """Parses a string of templates into a list of file handles."""

        template_list = template_str.split(":")
        template_files = []
        try:
            for tmplt in template_list:
                template_files.append(open(os.path.join(self.template_dir, tmplt), "r"))
        except:  # noqa
            for tmplt in template_files:
                tmplt.close()
            raise

        return template_files