class_docstr: Extracts entities via lookup tables and regexes defined in the training data.
docstr: Persist this model.
docstr_tok: ["Persist","this","model","."]
code: def persist(self) -> None:
      """Persist this model."""
      if not self.patterns:
          return
      with self._model_storage.write_to(self._resource) as model_path:
          regex_file = model_path / self.REGEX_FILE_NAME
          rasa.shared.utils.io.dump_obj_as_json_to_file(
              regex_file, self.patterns
          )
  
imports: from __future__ import annotations
  import logging
  import re
  from typing import Any, Dict, List, Optional, Text
  from rasa.engine.graph import GraphComponent, ExecutionContext
  from rasa.engine.recipes.default_recipe import DefaultV1Recipe
  from rasa.engine.storage.storage import ModelStorage
  from rasa.engine.storage.resource import Resource
  import rasa.shared.utils.io
  import rasa.nlu.utils.pattern_utils
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.shared.nlu.training_data.message import Message
  from rasa.shared.nlu.constants import ENTITIES, ENTITY_ATTRIBUTE_VALUE, ENTITY_ATTRIBUTE_START, ENTITY_ATTRIBUTE_END, TEXT, ENTITY_ATTRIBUTE_TYPE
  from rasa.nlu.extractors.extractor import EntityExtractorMixin
label_desc: Use image node_id 8 for calling the RegexEntityExtractor obj's underlying member method code with example usage: obj.persist() without return types