def __init__(self, templates_file, lexerStyle=LEXER_TOKENS):

        self.template_list = self.load_templates(templates_file)
        self.template_dic = {}
        self.state_id = {}
        self.lexerStyle = lexerStyle

        # Build Template dictionaries for later searching
        for template in self.template_list:
            self.template_dic[template.ID] = template
            if template.state in self.state_id:
                self.state_id[template.state].extend([template.ID])
            else:
                self.state_id[template.state] = [template.ID]
dataset/ETHPy150Open hgascon/pulsar/pulsar/core/lens.py/TemplateList.__init__/original