def METHOD_NAME(data):
    template = re.compile(b'EIRT.\0\0\0..{8}.{8}\xD6\xFD\xB2\x7E')
    matches = template.finditer(data)
    matches = list(itertools.islice(matches, 2))
    if len(matches) == 0:
        raise ValueError("Cannot find OpenFst TRIE dictionary")
    if len(matches) > 1:
        raise ValueError("Found more than one OpenFst TRIE signature in LM file, cannot decide which one is right")
    return matches[0].start()