code: def __init__(
      self,
      pattern: str,
      re_obj: Optional[Pattern],
      maxlen: Optional[int],
  ):
      super().__init__(str)
      self.pattern = pattern
      self.re_obj = (
          re_obj if re_obj is not None else re.compile(pattern)
      )
      self.maxlen = maxlen
  
imports: from typing import Union, Dict, Pattern, Callable, Any, List, Optional
  import re
  import logging
label_desc: Use image node_id 1 to create a new RegexValidator object from inherited base classes: TypedValidator with example: obj = RegexValidator(pattern, re_obj, maxlen)