def METHOD_NAME():
    pattern_analyzer = _PatternAnalyzer(name="test_analyzer", flags="CANON_EQ")
    analyzers = []
    analyzers.append(pattern_analyzer)
    pattern_tokenizer = _PatternTokenizer(name="test_tokenizer", flags="CANON_EQ")
    tokenizers = []
    tokenizers.append(pattern_tokenizer)
    index = SearchIndex(name="test", fields=None, analyzers=analyzers, tokenizers=tokenizers)
    result = SearchIndex._from_generated(index)
    assert isinstance(result.analyzers[0], PatternAnalyzer)
    assert isinstance(result.analyzers[0].flags, list)
    assert result.analyzers[0].flags[0] == "CANON_EQ"
    assert isinstance(result.tokenizers[0], PatternTokenizer)
    assert isinstance(result.tokenizers[0].flags, list)
    assert result.tokenizers[0].flags[0] == "CANON_EQ"