class_docstr: Reader for NLU training data.
docstr: Extract the regex features from the entity synonyms.
docstr_tok: ["Extract","the","regex","features","from","the","entity","synonyms","."]
code: def _extract_regex_features(
      entity: Dict[Text, Any], examples: List[Dict[Text, Any]]
  ) -> List[Dict[Text, Any]]:
      """Extract the regex features from the entity synonyms."""
      synonyms = [e["synonyms"] for e in examples if "synonyms" in e]
      synonyms = DialogflowReader._flatten(synonyms)
      return [
          {"name": entity.get("name"), "pattern": synonym}
          for synonym in synonyms
      ]
  
imports: import logging
  import os
  from pathlib import Path
  from typing import Any, Dict, Optional, Text, List, Tuple, Union
  import rasa.shared.nlu.training_data.util
  from rasa.shared.constants import DOCS_BASE_URL
  from rasa.shared.nlu.training_data.formats.readerwriter import TrainingDataReader
  from rasa.shared.nlu.training_data.util import transform_entity_synonyms
  import rasa.shared.utils.io
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.shared.nlu.training_data.message import Message
label_desc: Use image node_id 7 for calling the DialogflowReader obj's underlying member method code with example usage: obj._extract_regex_features(entity, examples) and returns: unknown