code: def count_substr(self, gen, pattern):
      return len(re.findall(pattern, gen))
  
file_path: BigDL/python/llm/dev/benchmark/ceval/evaluators/qwen.py
imports: import re
  from tqdm import tqdm
  import torch
  from thefuzz import process
  from transformers import AutoTokenizer
  from transformers.generation import GenerationConfig
  from bigdl.llm.transformers import AutoModelForCausalLM
  from evaluators.evaluator import Evaluator
label_desc: Use image node_id 3 for calling the QwenEvaluator obj's underlying member method code with example usage: obj.count_substr(gen, pattern) and returns: len