code: def _crnn(
      arch: str,
      pretrained: bool,
      backbone_fn: Callable[[Any], nn.Module],
      pretrained_backbone: bool = True,
      ignore_keys: Optional[List[str]] = None,
      **kwargs: Any,
  ) -> CRNN:
      pretrained_backbone = pretrained_backbone and not pretrained
  
      # Feature extractor
      feat_extractor = backbone_fn(pretrained=pretrained_backbone).features  # type: ignore[call-arg]
  
      kwargs["vocab"] = kwargs.get("vocab", default_cfgs[arch]["vocab"])
      kwargs["input_shape"] = kwargs.get(
          "input_shape", default_cfgs[arch]["input_shape"]
      )
  
      _cfg = deepcopy(default_cfgs[arch])
      _cfg["vocab"] = kwargs["vocab"]
      _cfg["input_shape"] = kwargs["input_shape"]
  
      # Build the model
      model = CRNN(feat_extractor, cfg=_cfg, **kwargs)
      # Load pretrained parameters
      if pretrained:
          # The number of classes is not the same as the number of classes in the pretrained model =>
          # remove the last layer weights
          _ignore_keys = (
              ignore_keys
              if _cfg["vocab"] != default_cfgs[arch]["vocab"]
              else None
          )
          load_pretrained_params(
              model, _cfg["url"], ignore_keys=_ignore_keys
          )
  
      return model
  
imports: from copy import deepcopy
  from itertools import groupby
  from typing import Any, Callable, Dict, List, Optional, Tuple
  import torch
  from torch import nn
  from torch.nn import functional
  from doctr.datasets import VOCABS, decode_sequence
  from ...classification import mobilenet_v3_large_r, mobilenet_v3_small_r, vgg16_bn_r
  from ...utils.pytorch import load_pretrained_params
  from ..core import RecognitionModel, RecognitionPostProcessor
label_desc: Use image node_id 1 for calling a global function with example usage: _crnn(arch, pretrained, backbone_fn, pretrained_backbone, ignore_keys) and returns: model