






import inspect
import unittest

from transformers import ResNetConfig
from transformers.testing_utils import require_torch, require_vision, slow, torch_device
from transformers.utils import cached_property, is_torch_available, is_vision_available

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


if is_torch_available():
   import torch
   from torch import nn

   from transformers import ResNetBackbone, ResNetForImageClassification, ResNetModel
   from transformers.models.resnet.modeling_resnet import RESNET_PRETRAINED_MODEL_ARCHIVE_LIST


if is_vision_available():
   from PIL import Image

   from transformers import AutoImageProcessor

class        snake_case_				:







   """simple docstring"""



   def __init__(     self:						Union[str, Any] ,							snake_case__:						List[Any] ,							snake_case__:						Optional[int]=3 ,							snake_case__:						Optional[int]=32 ,							snake_case__:						Union[str, Any]=3 ,							snake_case__:						Optional[int]=10 ,							snake_case__:						int=[10, 20, 30, 40] ,							snake_case__:						Optional[Any]=[1, 1, 2, 1] ,							snake_case__:						int=True ,							snake_case__:						Dict=True ,							snake_case__:						List[str]="relu" ,							snake_case__:						Union[str, Any]=3 ,							snake_case__:						Union[str, Any]=None ,							snake_case__:						int=["stage2", "stage3", "stage4"] ,							snake_case__:						str=[2, 3, 4] ,							)	->		Tuple:


       """simple docstring"""



       _lowercase     			=						parent
       _lowercase     			=						batch_size
       _lowercase     			=						image_size
       _lowercase     			=						num_channels
       _lowercase     			=						embeddings_size
       _lowercase     			=						hidden_sizes
       _lowercase     			=						depths
       _lowercase     			=						is_training
       _lowercase     			=						use_labels
       _lowercase     			=						hidden_act
       _lowercase     			=						num_labels
       _lowercase     			=						scope
       _lowercase     			=						len(SCREAMING_SNAKE_CASE_						)
       _lowercase     			=						out_features
       _lowercase     			=						out_indices

   def       SCREAMING_SNAKE_CASE__					(     self:						Any						)	->		Optional[Any]:


       """simple docstring"""



       _lowercase     			=						floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size]						)

       _lowercase     			=						None
       if self.use_labels:
           _lowercase     			=						ids_tensor([self.batch_size] ,							self.num_labels						)

       _lowercase     			=						self.get_config()

       return config, pixel_values, labels

   def       SCREAMING_SNAKE_CASE__					(     self:						Tuple						)	->		List[str]:


       """simple docstring"""



       return ResNetConfig(
           num_channels=self.num_channels ,							embeddings_size=self.embeddings_size ,							hidden_sizes=self.hidden_sizes ,							depths=self.depths ,							hidden_act=self.hidden_act ,							num_labels=self.num_labels ,							out_features=self.out_features ,							out_indices=self.out_indices ,							)

   def       SCREAMING_SNAKE_CASE__					(     self:						Union[str, Any] ,							snake_case__:						Dict ,							snake_case__:						Union[str, Any] ,							snake_case__:						int						)	->		Optional[Any]:


       """simple docstring"""



       _lowercase     			=						ResNetModel(config=SCREAMING_SNAKE_CASE_						)
       model.to(SCREAMING_SNAKE_CASE_						)
       model.eval()
       _lowercase     			=						model(SCREAMING_SNAKE_CASE_						)
       # expected last hidden states: B, C, H // 32, W // 32
       self.parent.assertEqual(
           result.last_hidden_state.shape ,							(self.batch_size, self.hidden_sizes[-1], self.image_size // 32, self.image_size // 32) ,							)

   def       SCREAMING_SNAKE_CASE__					(     self:						List[str] ,							snake_case__:						Any ,							snake_case__:						Optional[int] ,							snake_case__:						Any						)	->		List[Any]:


       """simple docstring"""



       _lowercase     			=						self.num_labels
       _lowercase     			=						ResNetForImageClassification(SCREAMING_SNAKE_CASE_						)
       model.to(SCREAMING_SNAKE_CASE_						)
       model.eval()
       _lowercase     			=						model(SCREAMING_SNAKE_CASE_ ,							labels=SCREAMING_SNAKE_CASE_						)
       self.parent.assertEqual(result.logits.shape ,							(self.batch_size, self.num_labels)						)

   def       SCREAMING_SNAKE_CASE__					(     self:						List[Any] ,							snake_case__:						Any ,							snake_case__:						List[str] ,							snake_case__:						str						)	->		str:


       """simple docstring"""



       _lowercase     			=						ResNetBackbone(config=SCREAMING_SNAKE_CASE_						)
       model.to(SCREAMING_SNAKE_CASE_						)
       model.eval()
       _lowercase     			=						model(SCREAMING_SNAKE_CASE_						)

       # verify feature maps
       self.parent.assertEqual(len(result.feature_maps						) ,							len(config.out_features						)						)
       self.parent.assertListEqual(list(result.feature_maps[0].shape						) ,							[self.batch_size, self.hidden_sizes[1], 4, 4]						)

       # verify channels
       self.parent.assertEqual(len(model.channels						) ,							len(config.out_features						)						)
       self.parent.assertListEqual(model.channels ,							config.hidden_sizes[1:]						)

       # verify backbone works with out_features=None
       _lowercase     			=						None
       _lowercase     			=						ResNetBackbone(config=SCREAMING_SNAKE_CASE_						)
       model.to(SCREAMING_SNAKE_CASE_						)
       model.eval()
       _lowercase     			=						model(SCREAMING_SNAKE_CASE_						)

       # verify feature maps
       self.parent.assertEqual(len(result.feature_maps						) ,							1						)
       self.parent.assertListEqual(list(result.feature_maps[0].shape						) ,							[self.batch_size, self.hidden_sizes[-1], 1, 1]						)

       # verify channels
       self.parent.assertEqual(len(model.channels						) ,							1						)
       self.parent.assertListEqual(model.channels ,							[config.hidden_sizes[-1]]						)

   def       SCREAMING_SNAKE_CASE__					(     self:						Optional[int]						)	->		Union[str, Any]:


       """simple docstring"""



       _lowercase     			=						self.prepare_config_and_inputs()
       _lowercase     			=						config_and_inputs
       _lowercase     			=						{'''pixel_values''': pixel_values}
       return config, inputs_dict






@require_torch
class        snake_case_				(							lowercase_   ,      lowercase_   ,      unittest.TestCase   ):







   """simple docstring"""



   __lowerCAmelCase  =    (
       (
           ResNetModel,
           ResNetForImageClassification,
           ResNetBackbone,
       )
       if is_torch_available()
       else ()
   )
   __lowerCAmelCase  =    (
       {"""feature-extraction""": ResNetModel, """image-classification""": ResNetForImageClassification}
       if is_torch_available()
       else {}
   )

   __lowerCAmelCase  =    True
   __lowerCAmelCase  =    False
   __lowerCAmelCase  =    False
   __lowerCAmelCase  =    False
   __lowerCAmelCase  =    False

   def       SCREAMING_SNAKE_CASE__					(     self:						Any						)	->		Tuple:


       """simple docstring"""



       _lowercase     			=						ResNetModelTester(self						)
       _lowercase     			=						ConfigTester(self ,							config_class=SCREAMING_SNAKE_CASE_ ,							has_text_modality=SCREAMING_SNAKE_CASE_						)

   def       SCREAMING_SNAKE_CASE__					(     self:						str						)	->		Dict:


       """simple docstring"""



       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       SCREAMING_SNAKE_CASE__					(     self:						Union[str, Any]						)	->		Tuple:


       """simple docstring"""



       return

   @unittest.skip(reason='ResNet does not use inputs_embeds'						)
   def       SCREAMING_SNAKE_CASE__					(     self:						Union[str, Any]						)	->		int:


       """simple docstring"""



       pass

   @unittest.skip(reason='ResNet does not support input and output embeddings'						)
   def       SCREAMING_SNAKE_CASE__					(     self:						Dict						)	->		Optional[int]:


       """simple docstring"""



       pass

   def       SCREAMING_SNAKE_CASE__					(     self:						Dict						)	->		str:


       """simple docstring"""



       _lowercase     			=						self.model_tester.prepare_config_and_inputs_for_common()

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

           _lowercase     			=						['''pixel_values''']
           self.assertListEqual(arg_names[:1] ,							SCREAMING_SNAKE_CASE_						)

   def       SCREAMING_SNAKE_CASE__					(     self:						Dict						)	->		Optional[Any]:


       """simple docstring"""



       _lowercase     			=						self.model_tester.prepare_config_and_inputs()
       self.model_tester.create_and_check_model(*SCREAMING_SNAKE_CASE_						)

   def       SCREAMING_SNAKE_CASE__					(     self:						Any						)	->		Union[str, Any]:


       """simple docstring"""



       _lowercase     			=						self.model_tester.prepare_config_and_inputs()
       self.model_tester.create_and_check_backbone(*SCREAMING_SNAKE_CASE_						)

   def       SCREAMING_SNAKE_CASE__					(     self:						List[Any]						)	->		Union[str, Any]:


       """simple docstring"""



       _lowercase     			=						self.model_tester.prepare_config_and_inputs_for_common()

       for model_class in self.all_model_classes:
           _lowercase     			=						model_class(config=SCREAMING_SNAKE_CASE_						)
           for name, module in model.named_modules():
               if isinstance(SCREAMING_SNAKE_CASE_ ,							(nn.BatchNormad, nn.GroupNorm)						):
                   self.assertTrue(
                       torch.all(module.weight == 1						) ,							msg=f'''Parameter {name} of model {model_class} seems not properly initialized''' ,							)
                   self.assertTrue(
                       torch.all(module.bias == 0						) ,							msg=f'''Parameter {name} of model {model_class} seems not properly initialized''' ,							)

   def       SCREAMING_SNAKE_CASE__					(     self:						Tuple						)	->		str:


       """simple docstring"""



       def check_hidden_states_output(snake_case__:						Optional[Any] ,							snake_case__:						str ,							snake_case__:						int						):
           _lowercase     			=						model_class(SCREAMING_SNAKE_CASE_						)
           model.to(SCREAMING_SNAKE_CASE_						)
           model.eval()

           with torch.no_grad():
               _lowercase     			=						model(**self._prepare_for_class(SCREAMING_SNAKE_CASE_ ,							SCREAMING_SNAKE_CASE_						)						)

           _lowercase     			=						outputs.encoder_hidden_states if config.is_encoder_decoder else outputs.hidden_states

           _lowercase     			=						self.model_tester.num_stages
           self.assertEqual(len(SCREAMING_SNAKE_CASE_						) ,							expected_num_stages + 1						)

           # ResNet's feature maps are of shape (batch_size, num_channels, height, width)
           self.assertListEqual(
               list(hidden_states[0].shape[-2:]						) ,							[self.model_tester.image_size // 4, self.model_tester.image_size // 4] ,							)

       _lowercase     			=						self.model_tester.prepare_config_and_inputs_for_common()
       _lowercase     			=						['''basic''', '''bottleneck''']
       for model_class in self.all_model_classes:
           for layer_type in layers_type:
               _lowercase     			=						layer_type
               _lowercase     			=						True
               check_hidden_states_output(SCREAMING_SNAKE_CASE_ ,							SCREAMING_SNAKE_CASE_ ,							SCREAMING_SNAKE_CASE_						)

               # check that output_hidden_states also work using config
               del inputs_dict["output_hidden_states"]
               _lowercase     			=						True

               check_hidden_states_output(SCREAMING_SNAKE_CASE_ ,							SCREAMING_SNAKE_CASE_ ,							SCREAMING_SNAKE_CASE_						)

   @unittest.skip(reason='ResNet does not use feedforward chunking'						)
   def       SCREAMING_SNAKE_CASE__					(     self:						str						)	->		Union[str, Any]:


       """simple docstring"""



       pass

   def       SCREAMING_SNAKE_CASE__					(     self:						str						)	->		int:


       """simple docstring"""



       _lowercase     			=						self.model_tester.prepare_config_and_inputs()
       self.model_tester.create_and_check_for_image_classification(*SCREAMING_SNAKE_CASE_						)

   @slow
   def       SCREAMING_SNAKE_CASE__					(     self:						Any						)	->		Dict:


       """simple docstring"""



       for model_name in RESNET_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
           _lowercase     			=						ResNetModel.from_pretrained(SCREAMING_SNAKE_CASE_						)
           self.assertIsNotNone(SCREAMING_SNAKE_CASE_						)






def 							UpperCAmelCase   ( ):


    '''simple docstring'''



    _lowercase     			=						Image.open('./tests/fixtures/tests_samples/COCO/000000039769.png'   )
    return image

@require_torch
@require_vision
class        snake_case_				(							unittest.TestCase   ):







   """simple docstring"""



   @cached_property
   def       SCREAMING_SNAKE_CASE__					(     self:						Any						)	->		int:


       """simple docstring"""



       return (
           AutoImageProcessor.from_pretrained(RESNET_PRETRAINED_MODEL_ARCHIVE_LIST[0]						)
           if is_vision_available()
           else None
       )

   @slow
   def       SCREAMING_SNAKE_CASE__					(     self:						Optional[Any]						)	->		List[Any]:


       """simple docstring"""



       _lowercase     			=						ResNetForImageClassification.from_pretrained(RESNET_PRETRAINED_MODEL_ARCHIVE_LIST[0]						).to(SCREAMING_SNAKE_CASE_						)

       _lowercase     			=						self.default_image_processor
       _lowercase     			=						prepare_img()
       _lowercase     			=						image_processor(images=SCREAMING_SNAKE_CASE_ ,							return_tensors='pt'						).to(SCREAMING_SNAKE_CASE_						)

       # forward pass
       with torch.no_grad():
           _lowercase     			=						model(**SCREAMING_SNAKE_CASE_						)

       # verify the logits
       _lowercase     			=						torch.Size((1, 1_000)						)
       self.assertEqual(outputs.logits.shape ,							SCREAMING_SNAKE_CASE_						)

       _lowercase     			=						torch.tensor([-11.10_69, -9.78_77, -8.37_77]						).to(SCREAMING_SNAKE_CASE_						)

       self.assertTrue(torch.allclose(outputs.logits[0, :3] ,							SCREAMING_SNAKE_CASE_ ,							atol=1E-4						)						)






@require_torch
class        snake_case_				(							lowercase_   ,      unittest.TestCase   ):







   """simple docstring"""



   __lowerCAmelCase  =    (ResNetBackbone,) if is_torch_available() else ()
   __lowerCAmelCase  =    False
   __lowerCAmelCase  =    ResNetConfig

   def       SCREAMING_SNAKE_CASE__					(     self:						Union[str, Any]						)	->		Union[str, Any]:


       """simple docstring"""



       _lowercase     			=						ResNetModelTester(self						)


'''simple docstring'''





from ..utils import DummyObject, requires_backends

class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Optional[int],     *SCREAMING_SNAKE_CASE_						:					List[str],     **SCREAMING_SNAKE_CASE_						:					Tuple   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




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




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					List[str],     *SCREAMING_SNAKE_CASE_						:					int,     **SCREAMING_SNAKE_CASE_						:					List[Any]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




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




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




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




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					List[Any],     *SCREAMING_SNAKE_CASE_						:					Dict,     **SCREAMING_SNAKE_CASE_						:					Dict   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					str,     *SCREAMING_SNAKE_CASE_						:					List[str],     **SCREAMING_SNAKE_CASE_						:					List[str]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					int,     *SCREAMING_SNAKE_CASE_						:					Tuple,     **SCREAMING_SNAKE_CASE_						:					List[Any]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Dict,     *SCREAMING_SNAKE_CASE_						:					List[str],     **SCREAMING_SNAKE_CASE_						:					List[str]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Tuple,     *SCREAMING_SNAKE_CASE_						:					str,     **SCREAMING_SNAKE_CASE_						:					Tuple   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					List[Any],     *SCREAMING_SNAKE_CASE_						:					List[Any],     **SCREAMING_SNAKE_CASE_						:					int   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					List[str],     *SCREAMING_SNAKE_CASE_						:					List[Any],     **SCREAMING_SNAKE_CASE_						:					Tuple   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Tuple,     *SCREAMING_SNAKE_CASE_						:					Optional[int],     **SCREAMING_SNAKE_CASE_						:					Tuple   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Any,     *SCREAMING_SNAKE_CASE_						:					str,     **SCREAMING_SNAKE_CASE_						:					Optional[Any]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Any,     *SCREAMING_SNAKE_CASE_						:					Tuple,     **SCREAMING_SNAKE_CASE_						:					List[str]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					List[str],     *SCREAMING_SNAKE_CASE_						:					str,     **SCREAMING_SNAKE_CASE_						:					int   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					List[Any],     *SCREAMING_SNAKE_CASE_						:					str,     **SCREAMING_SNAKE_CASE_						:					List[str]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




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




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




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




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					List[str],     *SCREAMING_SNAKE_CASE_						:					List[Any],     **SCREAMING_SNAKE_CASE_						:					Tuple   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					List[str],     *SCREAMING_SNAKE_CASE_						:					Dict,     **SCREAMING_SNAKE_CASE_						:					Dict   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					List[str],     *SCREAMING_SNAKE_CASE_						:					int,     **SCREAMING_SNAKE_CASE_						:					int   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Any,     *SCREAMING_SNAKE_CASE_						:					Tuple,     **SCREAMING_SNAKE_CASE_						:					Any   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Tuple,     *SCREAMING_SNAKE_CASE_						:					Dict,     **SCREAMING_SNAKE_CASE_						:					Dict   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					List[str],     *SCREAMING_SNAKE_CASE_						:					int,     **SCREAMING_SNAKE_CASE_						:					Union[str, Any]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					int,     *SCREAMING_SNAKE_CASE_						:					str,     **SCREAMING_SNAKE_CASE_						:					int   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




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




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					int,     *SCREAMING_SNAKE_CASE_						:					List[Any],     **SCREAMING_SNAKE_CASE_						:					Dict   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					str,     *SCREAMING_SNAKE_CASE_						:					Tuple,     **SCREAMING_SNAKE_CASE_						:					str   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




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




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




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




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




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




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					str,     *SCREAMING_SNAKE_CASE_						:					List[Any],     **SCREAMING_SNAKE_CASE_						:					Tuple   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




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




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Union[str, Any],     *SCREAMING_SNAKE_CASE_						:					Dict,     **SCREAMING_SNAKE_CASE_						:					int   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




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




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Any,     *SCREAMING_SNAKE_CASE_						:					Tuple,     **SCREAMING_SNAKE_CASE_						:					int   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




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




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




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




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




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




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					str,     *SCREAMING_SNAKE_CASE_						:					Dict,     **SCREAMING_SNAKE_CASE_						:					str   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Union[str, Any],     *SCREAMING_SNAKE_CASE_						:					Union[str, Any],     **SCREAMING_SNAKE_CASE_						:					Union[str, Any]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




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




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Tuple,     *SCREAMING_SNAKE_CASE_						:					Union[str, Any],     **SCREAMING_SNAKE_CASE_						:					Tuple   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Optional[Any],     *SCREAMING_SNAKE_CASE_						:					Dict,     **SCREAMING_SNAKE_CASE_						:					List[Any]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Optional[int],     *SCREAMING_SNAKE_CASE_						:					int,     **SCREAMING_SNAKE_CASE_						:					Any   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					List[str],     *SCREAMING_SNAKE_CASE_						:					str,     **SCREAMING_SNAKE_CASE_						:					Any   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					str,     *SCREAMING_SNAKE_CASE_						:					List[Any],     **SCREAMING_SNAKE_CASE_						:					int   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Optional[int],     *SCREAMING_SNAKE_CASE_						:					str,     **SCREAMING_SNAKE_CASE_						:					str   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




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




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Tuple,     *SCREAMING_SNAKE_CASE_						:					Any,     **SCREAMING_SNAKE_CASE_						:					Any   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




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




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




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




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




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




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					List[Any],     *SCREAMING_SNAKE_CASE_						:					Dict,     **SCREAMING_SNAKE_CASE_						:					List[Any]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Any,     *SCREAMING_SNAKE_CASE_						:					List[str],     **SCREAMING_SNAKE_CASE_						:					Tuple   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Tuple,     *SCREAMING_SNAKE_CASE_						:					Any,     **SCREAMING_SNAKE_CASE_						:					Optional[Any]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Dict,     *SCREAMING_SNAKE_CASE_						:					Tuple,     **SCREAMING_SNAKE_CASE_						:					Optional[int]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




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




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Tuple,     *SCREAMING_SNAKE_CASE_						:					str,     **SCREAMING_SNAKE_CASE_						:					List[str]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




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




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




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




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Optional[Any],     *SCREAMING_SNAKE_CASE_						:					Dict,     **SCREAMING_SNAKE_CASE_						:					Any   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




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




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					int,     *SCREAMING_SNAKE_CASE_						:					Any,     **SCREAMING_SNAKE_CASE_						:					Dict   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Dict,     *SCREAMING_SNAKE_CASE_						:					Dict,     **SCREAMING_SNAKE_CASE_						:					Optional[int]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					str,     *SCREAMING_SNAKE_CASE_						:					List[Any],     **SCREAMING_SNAKE_CASE_						:					List[str]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Dict,     *SCREAMING_SNAKE_CASE_						:					Union[str, Any],     **SCREAMING_SNAKE_CASE_						:					Tuple   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




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




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




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




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					str,     *SCREAMING_SNAKE_CASE_						:					str,     **SCREAMING_SNAKE_CASE_						:					List[str]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




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




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Optional[Any],     *SCREAMING_SNAKE_CASE_						:					Optional[int],     **SCREAMING_SNAKE_CASE_						:					Optional[int]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




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

