
import collections
import inspect
import unittest

from transformers import DonutSwinConfig
from transformers.testing_utils import require_torch, slow, torch_device
from transformers.utils import is_torch_available

from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, _config_zero_init, floats_tensor, ids_tensor
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
 import torch
 from torch import nn

 from transformers import DonutSwinModel
 from transformers.models.donut.modeling_donut_swin import DONUT_SWIN_PRETRAINED_MODEL_ARCHIVE_LIST


class   __lowerCAmelCase		:



      """simple docstring"""







      def __init__( self						:    Union[str, Any]			,    _snake_case						:    Optional[Any]			,    _snake_case						:    Dict=13			,    _snake_case						:    str=32			,    _snake_case						:    int=2			,    _snake_case						:    Any=3			,    _snake_case						:    Union[str, Any]=16			,    _snake_case						:    Optional[int]=[1, 2, 1]			,    _snake_case						:    List[Any]=[2, 2, 4]			,    _snake_case						:    List[Any]=2			,    _snake_case						:    int=2.0			,    _snake_case						:    str=True			,    _snake_case						:    str=0.0			,    _snake_case						:    List[str]=0.0			,    _snake_case						:    Any=0.1			,    _snake_case						:    Dict="gelu"			,    _snake_case						:    str=False			,    _snake_case						:    Optional[int]=True			,    _snake_case						:    int=0.02			,    _snake_case						:    Any=1E-5			,    _snake_case						:    Union[str, Any]=True			,    _snake_case						:    Optional[Any]=None			,    _snake_case						:    int=True			,    _snake_case						:    Dict=10			,    _snake_case						:    Optional[int]=8			,    ):
          __lowercase						:     Optional[int]		      =    parent
          __lowercase						:     Optional[Any]		      =    batch_size
          __lowercase						:     Optional[Any]		      =    image_size
          __lowercase						:     List[str]		      =    patch_size
          __lowercase						:     int		      =    num_channels
          __lowercase						:     Tuple		      =    embed_dim
          __lowercase						:     List[Any]		      =    depths
          __lowercase						:     Union[str, Any]		      =    num_heads
          __lowercase						:     Union[str, Any]		      =    window_size
          __lowercase						:     Union[str, Any]		      =    mlp_ratio
          __lowercase						:     List[Any]		      =    qkv_bias
          __lowercase						:     Optional[int]		      =    hidden_dropout_prob
          __lowercase						:     Optional[int]		      =    attention_probs_dropout_prob
          __lowercase						:     Optional[int]		      =    drop_path_rate
          __lowercase						:     List[Any]		      =    hidden_act
          __lowercase						:     Optional[int]		      =    use_absolute_embeddings
          __lowercase						:     Union[str, Any]		      =    patch_norm
          __lowercase						:     str		      =    layer_norm_eps
          __lowercase						:     str		      =    initializer_range
          __lowercase						:     Tuple		      =    is_training
          __lowercase						:     Union[str, Any]		      =    scope
          __lowercase						:     Tuple		      =    use_labels
          __lowercase						:     Any		      =    type_sequence_label_size
          __lowercase						:     List[Any]		      =    encoder_stride




      def 						snake_case_     ( self						:    Dict			):
          __lowercase						:     Dict		      =    floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size]			)

          __lowercase						:     Union[str, Any]		      =    None
          if self.use_labels:
              __lowercase						:     Tuple		      =    ids_tensor([self.batch_size]			,    self.type_sequence_label_size			)

          __lowercase						:     Optional[Any]		      =    self.get_config()

          return config, pixel_values, labels




      def 						snake_case_     ( self						:    Any			):
          return DonutSwinConfig(
              image_size=self.image_size			,    patch_size=self.patch_size			,    num_channels=self.num_channels			,    embed_dim=self.embed_dim			,    depths=self.depths			,    num_heads=self.num_heads			,    window_size=self.window_size			,    mlp_ratio=self.mlp_ratio			,    qkv_bias=self.qkv_bias			,    hidden_dropout_prob=self.hidden_dropout_prob			,    attention_probs_dropout_prob=self.attention_probs_dropout_prob			,    drop_path_rate=self.drop_path_rate			,    hidden_act=self.hidden_act			,    use_absolute_embeddings=self.use_absolute_embeddings			,    path_norm=self.patch_norm			,    layer_norm_eps=self.layer_norm_eps			,    initializer_range=self.initializer_range			,    encoder_stride=self.encoder_stride			,    )




      def 						snake_case_     ( self						:    str			,    _snake_case						:    str			,    _snake_case						:    str			,    _snake_case						:    str			):
          __lowercase						:     Tuple		      =    DonutSwinModel(config=_snake_case			)
          model.to(_snake_case			)
          model.eval()
          __lowercase						:     List[str]		      =    model(_snake_case			)

          __lowercase						:     List[str]		      =    ((config.image_size // config.patch_size) ** 2) // (4 ** (len(config.depths			) - 1))
          __lowercase						:     Optional[int]		      =    int(config.embed_dim * 2 ** (len(config.depths			) - 1)			)

          self.parent.assertEqual(result.last_hidden_state.shape			,    (self.batch_size, expected_seq_len, expected_dim)			)




      def 						snake_case_     ( self						:    Union[str, Any]			):
          __lowercase						:     Union[str, Any]		      =    self.prepare_config_and_inputs()
          (
              (
              __lowercase
          )      , (
              __lowercase
          )      , (
              __lowercase
          )      , 
          )						:     Union[str, Any]		      =    config_and_inputs
          __lowercase						:     Optional[int]		      =    {'''pixel_values''': pixel_values}
          return config, inputs_dict






@require_torch
class   __lowerCAmelCase		(		lowerCAmelCase_	,	lowerCAmelCase_	,	unittest.TestCase ):



      """simple docstring"""







      A__		:     str       				=      (DonutSwinModel,) if is_torch_available() else ()
      A__		:     List[str]       				=      {'''feature-extraction''': DonutSwinModel} if is_torch_available() else {}
      A__		:     Optional[Any]       				=      True

      A__		:     Optional[int]       				=      False
      A__		:     Optional[int]       				=      False
      A__		:     Tuple       				=      False




      def 						snake_case_     ( self						:    List[Any]			):
          __lowercase						:     Any		      =    DonutSwinModelTester(self			)
          __lowercase						:     Optional[Any]		      =    ConfigTester(self			,    config_class=_snake_case			,    embed_dim=37			)




      def 						snake_case_     ( self						:    Dict			):
          self.create_and_test_config_common_properties()
          self.config_tester.create_and_test_config_to_json_string()
          self.config_tester.create_and_test_config_to_json_file()
          self.config_tester.create_and_test_config_from_and_save_pretrained()
          self.config_tester.create_and_test_config_with_num_labels()
          self.config_tester.check_config_can_be_init_without_params()
          self.config_tester.check_config_arguments_init()




      def 						snake_case_     ( self						:    int			):
          return




      def 						snake_case_     ( self						:    List[Any]			):
          __lowercase						:     Any		      =    self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_model(*_snake_case			)




      def 						snake_case_     ( self						:    str			):
          # DonutSwin does not use inputs_embeds
          pass




      def 						snake_case_     ( self						:    Dict			):
          __lowercase      , __lowercase						:     Union[str, Any]		      =    self.model_tester.prepare_config_and_inputs_for_common()

          for model_class in self.all_model_classes:
              __lowercase						:     List[Any]		      =    model_class(_snake_case			)
              self.assertIsInstance(model.get_input_embeddings()			,    (nn.Module)			)
              __lowercase						:     Optional[int]		      =    model.get_output_embeddings()
              self.assertTrue(x is None or isinstance(_snake_case			,    nn.Linear			)			)




      def 						snake_case_     ( self						:    Optional[int]			):
          __lowercase      , __lowercase						:     int		      =    self.model_tester.prepare_config_and_inputs_for_common()

          for model_class in self.all_model_classes:
              __lowercase						:     str		      =    model_class(_snake_case			)
              __lowercase						:     str		      =    inspect.signature(model.forward			)
              # signature.parameters is an OrderedDict => so arg_names order is deterministic
              __lowercase						:     List[Any]		      =    [*signature.parameters.keys()]

              __lowercase						:     Union[str, Any]		      =    ['''pixel_values''']
              self.assertListEqual(arg_names[:1]			,    _snake_case			)




      def 						snake_case_     ( self						:    List[Any]			):
          __lowercase      , __lowercase						:     Union[str, Any]		      =    self.model_tester.prepare_config_and_inputs_for_common()
          __lowercase						:     str		      =    True

          for model_class in self.all_model_classes:
              __lowercase						:     Optional[int]		      =    True
              __lowercase						:     Dict		      =    False
              __lowercase						:     int		      =    True
              __lowercase						:     Tuple		      =    model_class(_snake_case			)
              model.to(_snake_case			)
              model.eval()
              with torch.no_grad():
                  __lowercase						:     Dict		      =    model(**self._prepare_for_class(_snake_case			,    _snake_case			)			)
              __lowercase						:     List[Any]		      =    outputs.attentions
              __lowercase						:     List[Any]		      =    len(self.model_tester.depths			)
              self.assertEqual(len(_snake_case			)			,    _snake_case			)

              # check that output_attentions also work using config
              del inputs_dict["output_attentions"]
              __lowercase						:     List[str]		      =    True
              __lowercase						:     int		      =    config.window_size**2
              __lowercase						:     Optional[Any]		      =    model_class(_snake_case			)
              model.to(_snake_case			)
              model.eval()
              with torch.no_grad():
                  __lowercase						:     Any		      =    model(**self._prepare_for_class(_snake_case			,    _snake_case			)			)
              __lowercase						:     Union[str, Any]		      =    outputs.attentions
              self.assertEqual(len(_snake_case			)			,    _snake_case			)

              self.assertListEqual(
                  list(attentions[0].shape[-3:]			)			,    [self.model_tester.num_heads[0], window_size_squared, window_size_squared]			,    )
              __lowercase						:     Optional[Any]		      =    len(_snake_case			)

              # Check attention is always last and order is fine
              __lowercase						:     int		      =    True
              __lowercase						:     int		      =    True
              __lowercase						:     Any		      =    model_class(_snake_case			)
              model.to(_snake_case			)
              model.eval()
              with torch.no_grad():
                  __lowercase						:     List[str]		      =    model(**self._prepare_for_class(_snake_case			,    _snake_case			)			)

              if hasattr(self.model_tester			,    '''num_hidden_states_types'''			):
                  __lowercase						:     List[Any]		      =    self.model_tester.num_hidden_states_types
              else:
                  # also another +1 for reshaped_hidden_states
                  __lowercase						:     Dict		      =    2
              self.assertEqual(out_len + added_hidden_states			,    len(_snake_case			)			)

              __lowercase						:     List[Any]		      =    outputs.attentions

              self.assertEqual(len(_snake_case			)			,    _snake_case			)

              self.assertListEqual(
                  list(self_attentions[0].shape[-3:]			)			,    [self.model_tester.num_heads[0], window_size_squared, window_size_squared]			,    )




      def 						snake_case_     ( self						:    int			,    _snake_case						:    Dict			,    _snake_case						:    Union[str, Any]			,    _snake_case						:    int			,    _snake_case						:    str			):
          __lowercase						:     str		      =    model_class(_snake_case			)
          model.to(_snake_case			)
          model.eval()

          with torch.no_grad():
              __lowercase						:     List[Any]		      =    model(**self._prepare_for_class(_snake_case			,    _snake_case			)			)

          __lowercase						:     Optional[int]		      =    outputs.hidden_states

          __lowercase						:     Optional[Any]		      =    getattr(
              self.model_tester			,    '''expected_num_hidden_layers'''			,    len(self.model_tester.depths			) + 1			)
          self.assertEqual(len(_snake_case			)			,    _snake_case			)

          # DonutSwin has a different seq_length
          __lowercase						:     Optional[int]		      =    (
              config.patch_size
              if isinstance(config.patch_size			,    collections.abc.Iterable			)
              else (config.patch_size, config.patch_size)
          )

          __lowercase						:     Any		      =    (image_size[1] // patch_size[1]) * (image_size[0] // patch_size[0])

          self.assertListEqual(
              list(hidden_states[0].shape[-2:]			)			,    [num_patches, self.model_tester.embed_dim]			,    )

          __lowercase						:     Tuple		      =    outputs.reshaped_hidden_states
          self.assertEqual(len(_snake_case			)			,    _snake_case			)

          __lowercase      , __lowercase      , __lowercase      , __lowercase						:     Tuple		      =    reshaped_hidden_states[0].shape
          __lowercase						:     Any		      =    (
              reshaped_hidden_states[0].view(_snake_case			,    _snake_case			,    height * width			).permute(0			,    2			,    1			)
          )
          self.assertListEqual(
              list(reshaped_hidden_states.shape[-2:]			)			,    [num_patches, self.model_tester.embed_dim]			,    )




      def 						snake_case_     ( self						:    Tuple			):
          __lowercase      , __lowercase						:     Union[str, Any]		      =    self.model_tester.prepare_config_and_inputs_for_common()

          __lowercase						:     Dict		      =    (
              self.model_tester.image_size
              if isinstance(self.model_tester.image_size			,    collections.abc.Iterable			)
              else (self.model_tester.image_size, self.model_tester.image_size)
          )

          for model_class in self.all_model_classes:
              __lowercase						:     Any		      =    True
              self.check_hidden_states_output(_snake_case			,    _snake_case			,    _snake_case			,    _snake_case			)

              # check that output_hidden_states also work using config
              del inputs_dict["output_hidden_states"]
              __lowercase						:     Any		      =    True

              self.check_hidden_states_output(_snake_case			,    _snake_case			,    _snake_case			,    _snake_case			)




      def 						snake_case_     ( self						:    List[Any]			):
          __lowercase      , __lowercase						:     int		      =    self.model_tester.prepare_config_and_inputs_for_common()
          __lowercase						:     List[str]		      =    3

          __lowercase						:     Dict		      =    (
              self.model_tester.image_size
              if isinstance(self.model_tester.image_size			,    collections.abc.Iterable			)
              else (self.model_tester.image_size, self.model_tester.image_size)
          )
          __lowercase						:     Dict		      =    (
              config.patch_size
              if isinstance(config.patch_size			,    collections.abc.Iterable			)
              else (config.patch_size, config.patch_size)
          )

          __lowercase						:     Any		      =    image_size[0] + patch_size[0] - (image_size[0] % patch_size[0])
          __lowercase						:     List[str]		      =    image_size[1] + patch_size[1] - (image_size[1] % patch_size[1])

          for model_class in self.all_model_classes:
              __lowercase						:     Tuple		      =    True
              self.check_hidden_states_output(_snake_case			,    _snake_case			,    _snake_case			,    (padded_height, padded_width)			)

              # check that output_hidden_states also work using config
              del inputs_dict["output_hidden_states"]
              __lowercase						:     Union[str, Any]		      =    True
              self.check_hidden_states_output(_snake_case			,    _snake_case			,    _snake_case			,    (padded_height, padded_width)			)




      @slow
      def 						snake_case_     ( self						:    Any			):
          for model_name in DONUT_SWIN_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
              __lowercase						:     List[str]		      =    DonutSwinModel.from_pretrained(_snake_case			)
              self.assertIsNotNone(_snake_case			)




      def 						snake_case_     ( self						:    int			):
          __lowercase      , __lowercase						:     str		      =    self.model_tester.prepare_config_and_inputs_for_common()

          __lowercase						:     Tuple		      =    _config_zero_init(_snake_case			)
          for model_class in self.all_model_classes:
              __lowercase						:     Optional[int]		      =    model_class(config=_snake_case			)
              for name, param in model.named_parameters():
                  if "embeddings" not in name and param.requires_grad:
                      self.assertIn(
                          ((param.data.mean() * 1E9).round() / 1E9).item()			,    [0.0, 1.0]			,    msg=F'Parameter {name} of model {model_class} seems not properly initialized'			,    )




from ..utils import DummyObject, requires_backends


class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     List[Any]       				=      ['''tokenizers''']




      def __init__( self						:    Any			,    *_snake_case						:    Optional[int]			,    **_snake_case						:    List[str]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Dict       				=      ['''tokenizers''']




      def __init__( self						:    Tuple			,    *_snake_case						:    List[Any]			,    **_snake_case						:    Tuple			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Optional[int]       				=      ['''tokenizers''']




      def __init__( self						:    List[Any]			,    *_snake_case						:    List[Any]			,    **_snake_case						:    List[str]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     List[str]       				=      ['''tokenizers''']




      def __init__( self						:    Optional[int]			,    *_snake_case						:    List[Any]			,    **_snake_case						:    int			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Dict       				=      ['''tokenizers''']




      def __init__( self						:    Optional[int]			,    *_snake_case						:    List[str]			,    **_snake_case						:    int			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Optional[int]       				=      ['''tokenizers''']




      def __init__( self						:    Optional[int]			,    *_snake_case						:    List[str]			,    **_snake_case						:    List[str]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Any       				=      ['''tokenizers''']




      def __init__( self						:    List[str]			,    *_snake_case						:    Union[str, Any]			,    **_snake_case						:    Optional[int]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Any       				=      ['''tokenizers''']




      def __init__( self						:    Optional[Any]			,    *_snake_case						:    Tuple			,    **_snake_case						:    List[Any]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     str       				=      ['''tokenizers''']




      def __init__( self						:    Tuple			,    *_snake_case						:    List[str]			,    **_snake_case						:    Dict			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Optional[Any]       				=      ['''tokenizers''']




      def __init__( self						:    Dict			,    *_snake_case						:    Optional[int]			,    **_snake_case						:    int			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Optional[Any]       				=      ['''tokenizers''']




      def __init__( self						:    Any			,    *_snake_case						:    Optional[int]			,    **_snake_case						:    Optional[Any]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     str       				=      ['''tokenizers''']




      def __init__( self						:    Optional[Any]			,    *_snake_case						:    Tuple			,    **_snake_case						:    str			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     int       				=      ['''tokenizers''']




      def __init__( self						:    Optional[Any]			,    *_snake_case						:    List[Any]			,    **_snake_case						:    str			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Any       				=      ['''tokenizers''']




      def __init__( self						:    int			,    *_snake_case						:    Dict			,    **_snake_case						:    Optional[Any]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     List[Any]       				=      ['''tokenizers''']




      def __init__( self						:    int			,    *_snake_case						:    Optional[Any]			,    **_snake_case						:    List[Any]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Optional[int]       				=      ['''tokenizers''']




      def __init__( self						:    Optional[Any]			,    *_snake_case						:    Dict			,    **_snake_case						:    Union[str, Any]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Optional[Any]       				=      ['''tokenizers''']




      def __init__( self						:    List[str]			,    *_snake_case						:    Union[str, Any]			,    **_snake_case						:    List[Any]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Optional[Any]       				=      ['''tokenizers''']




      def __init__( self						:    List[str]			,    *_snake_case						:    int			,    **_snake_case						:    Optional[Any]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Dict       				=      ['''tokenizers''']




      def __init__( self						:    List[Any]			,    *_snake_case						:    str			,    **_snake_case						:    Any			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Optional[int]       				=      ['''tokenizers''']




      def __init__( self						:    Any			,    *_snake_case						:    List[Any]			,    **_snake_case						:    List[str]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     int       				=      ['''tokenizers''']




      def __init__( self						:    List[str]			,    *_snake_case						:    Dict			,    **_snake_case						:    Any			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     List[Any]       				=      ['''tokenizers''']




      def __init__( self						:    Optional[Any]			,    *_snake_case						:    Union[str, Any]			,    **_snake_case						:    Dict			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     List[str]       				=      ['''tokenizers''']




      def __init__( self						:    List[Any]			,    *_snake_case						:    List[str]			,    **_snake_case						:    Optional[Any]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Any       				=      ['''tokenizers''']




      def __init__( self						:    Union[str, Any]			,    *_snake_case						:    int			,    **_snake_case						:    Any			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     List[str]       				=      ['''tokenizers''']




      def __init__( self						:    Union[str, Any]			,    *_snake_case						:    str			,    **_snake_case						:    Union[str, Any]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Tuple       				=      ['''tokenizers''']




      def __init__( self						:    Dict			,    *_snake_case						:    Any			,    **_snake_case						:    Tuple			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Dict       				=      ['''tokenizers''']




      def __init__( self						:    int			,    *_snake_case						:    List[str]			,    **_snake_case						:    List[str]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Optional[int]       				=      ['''tokenizers''']




      def __init__( self						:    List[str]			,    *_snake_case						:    Optional[Any]			,    **_snake_case						:    Tuple			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     List[str]       				=      ['''tokenizers''']




      def __init__( self						:    Dict			,    *_snake_case						:    List[str]			,    **_snake_case						:    Union[str, Any]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Union[str, Any]       				=      ['''tokenizers''']




      def __init__( self						:    Dict			,    *_snake_case						:    Union[str, Any]			,    **_snake_case						:    Any			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Dict       				=      ['''tokenizers''']




      def __init__( self						:    Any			,    *_snake_case						:    Optional[int]			,    **_snake_case						:    str			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     List[Any]       				=      ['''tokenizers''']




      def __init__( self						:    str			,    *_snake_case						:    List[str]			,    **_snake_case						:    Union[str, Any]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Union[str, Any]       				=      ['''tokenizers''']




      def __init__( self						:    Dict			,    *_snake_case						:    Dict			,    **_snake_case						:    Any			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     str       				=      ['''tokenizers''']




      def __init__( self						:    Tuple			,    *_snake_case						:    Dict			,    **_snake_case						:    Any			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Any       				=      ['''tokenizers''']




      def __init__( self						:    Optional[int]			,    *_snake_case						:    List[Any]			,    **_snake_case						:    Tuple			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Union[str, Any]       				=      ['''tokenizers''']




      def __init__( self						:    Dict			,    *_snake_case						:    str			,    **_snake_case						:    Any			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Union[str, Any]       				=      ['''tokenizers''']




      def __init__( self						:    Optional[Any]			,    *_snake_case						:    Dict			,    **_snake_case						:    List[str]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     int       				=      ['''tokenizers''']




      def __init__( self						:    Any			,    *_snake_case						:    List[str]			,    **_snake_case						:    str			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Union[str, Any]       				=      ['''tokenizers''']




      def __init__( self						:    Tuple			,    *_snake_case						:    Dict			,    **_snake_case						:    Any			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Dict       				=      ['''tokenizers''']




      def __init__( self						:    Union[str, Any]			,    *_snake_case						:    Any			,    **_snake_case						:    Optional[int]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     List[str]       				=      ['''tokenizers''']




      def __init__( self						:    Optional[int]			,    *_snake_case						:    List[Any]			,    **_snake_case						:    Any			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     List[str]       				=      ['''tokenizers''']




      def __init__( self						:    Tuple			,    *_snake_case						:    str			,    **_snake_case						:    int			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     str       				=      ['''tokenizers''']




      def __init__( self						:    Dict			,    *_snake_case						:    Tuple			,    **_snake_case						:    Dict			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     List[Any]       				=      ['''tokenizers''']




      def __init__( self						:    List[str]			,    *_snake_case						:    str			,    **_snake_case						:    List[str]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Union[str, Any]       				=      ['''tokenizers''']




      def __init__( self						:    Optional[int]			,    *_snake_case						:    List[Any]			,    **_snake_case						:    List[str]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Dict       				=      ['''tokenizers''']




      def __init__( self						:    str			,    *_snake_case						:    Tuple			,    **_snake_case						:    Optional[Any]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     int       				=      ['''tokenizers''']




      def __init__( self						:    Tuple			,    *_snake_case						:    Any			,    **_snake_case						:    List[Any]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     int       				=      ['''tokenizers''']




      def __init__( self						:    Any			,    *_snake_case						:    Optional[Any]			,    **_snake_case						:    List[Any]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Union[str, Any]       				=      ['''tokenizers''']




      def __init__( self						:    Dict			,    *_snake_case						:    str			,    **_snake_case						:    Optional[Any]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Dict       				=      ['''tokenizers''']




      def __init__( self						:    Any			,    *_snake_case						:    str			,    **_snake_case						:    Tuple			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Dict       				=      ['''tokenizers''']




      def __init__( self						:    Dict			,    *_snake_case						:    List[Any]			,    **_snake_case						:    Optional[int]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Optional[int]       				=      ['''tokenizers''']




      def __init__( self						:    Optional[Any]			,    *_snake_case						:    Dict			,    **_snake_case						:    Optional[int]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Dict       				=      ['''tokenizers''']




      def __init__( self						:    Tuple			,    *_snake_case						:    Dict			,    **_snake_case						:    int			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     str       				=      ['''tokenizers''']




      def __init__( self						:    Optional[int]			,    *_snake_case						:    List[str]			,    **_snake_case						:    str			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     List[str]       				=      ['''tokenizers''']




      def __init__( self						:    int			,    *_snake_case						:    str			,    **_snake_case						:    Union[str, Any]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Dict       				=      ['''tokenizers''']




      def __init__( self						:    Tuple			,    *_snake_case						:    Optional[Any]			,    **_snake_case						:    Optional[Any]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Dict       				=      ['''tokenizers''']




      def __init__( self						:    Dict			,    *_snake_case						:    Tuple			,    **_snake_case						:    Optional[Any]			):
          requires_backends(self			,    ['''tokenizers''']			)






class   __lowerCAmelCase		(		metaclass=lowerCAmelCase_ ):



      """simple docstring"""







      A__		:     Optional[Any]       				=      ['''tokenizers''']




      def __init__( self						:    List[str]			,    *_snake_case						:    Optional[int]			,    **_snake_case						:    List[str]			):
          requires_backends(self			,    ['''tokenizers''']			)


