code: def sar_resnet31(pretrained: bool = False, **kwargs: Any) -> SAR:
      """SAR with a resnet-31 feature extractor as described in `"Show, Attend and Read:A Simple and Strong
      Baseline for Irregular Text Recognition" <https://arxiv.org/pdf/1811.00751.pdf>`_.
  
      >>> import tensorflow as tf
      >>> from doctr.models import sar_resnet31
      >>> model = sar_resnet31(pretrained=False)
      >>> input_tensor = tf.random.uniform(shape=[1, 64, 256, 3], maxval=1, dtype=tf.float32)
      >>> out = model(input_tensor)
  
      Args:
      ----
          pretrained (bool): If True, returns a model pre-trained on our text recognition dataset
          **kwargs: keyword arguments of the SAR architecture
  
      Returns:
      -------
          text recognition architecture
      """
      return _sar("sar_resnet31", pretrained, resnet31, **kwargs)
  
imports: from copy import deepcopy
  from typing import Any, Dict, List, Optional, Tuple
  import tensorflow
  from tensorflow.keras import Model, Sequential, layers
  from doctr.datasets import VOCABS
  from doctr.utils.repr import NestedObject
  from ...classification import resnet31
  from ...utils.tensorflow import _bf16_to_float32, load_pretrained_params
  from ..core import RecognitionModel, RecognitionPostProcessor
label_desc: Use image node_id 2 for calling a global function with example usage: sar_resnet31(pretrained) and returns: _sar