




'''simple docstring'''







from __future__ import annotations

import collections
import tempfile
import unittest

import numpy as np

from transformers.testing_utils import require_tf, require_vision, slow
from transformers.utils import is_tf_available, is_vision_available

from ...test_modeling_tf_common import floats_tensor, ids_tensor, random_attention_mask
from ..bert.test_modeling_tf_bert import TFBertModelTester
from ..clip.test_modeling_tf_clip import TFCLIPVisionModelTester
from ..deit.test_modeling_tf_deit import TFDeiTModelTester
from ..roberta.test_modeling_tf_roberta import TFRobertaModelTester
from ..vit.test_modeling_tf_vit import TFViTModelTester


if is_tf_available():
      from transformers import (
          TFBertModel,
          TFCLIPVisionModel,
          TFDeiTModel,
          TFRobertaModel,
          TFVisionTextDualEncoderModel,
          TFViTModel,
          VisionTextDualEncoderConfig,
      )

if is_vision_available():
      from PIL import Image

      from transformers import VisionTextDualEncoderProcessor



def        lowerCamelCase__				(      __lowercase				):
     if isinstance(__lowercase     ,   collections.abc.Iterable				):
          return x
     return (x, x)







@require_tf
class 					_a :





     '''simple docstring'''



     def 			snake_case_      (				self							,__a							,__a							)      ->				Tuple:
          pass







     def 			snake_case_      (				self							)      ->				List[str]:
          pass







     def 			snake_case_      (				self							)      ->				Tuple:
          pass







     def 			snake_case_      (				self							,__a							,__a							,__a							,__a							,__a=None							,**__a							)      ->				Optional[Any]:
          snake_case			:      Optional[int]        =			VisionTextDualEncoderConfig.from_vision_text_configs(__a							,__a							)

          snake_case			:      List[str]        =			TFVisionTextDualEncoderModel(__a							)

          snake_case			:      List[str]        =			model(input_ids=__a							,pixel_values=__a							,attention_mask=__a							)

          self.assertEqual(output["""text_embeds"""].shape							,(input_ids.shape[0], config.projection_dim)							)
          self.assertEqual(output["""image_embeds"""].shape							,(pixel_values.shape[0], config.projection_dim)							)







     def 			snake_case_      (				self							,__a							,__a							,__a							,__a							,__a=None							,**__a							)      ->				Optional[int]:
          snake_case ,		snake_case			:      str        =			self.get_vision_text_model(__a							,__a							)
          snake_case			:      Optional[int]        =			TFVisionTextDualEncoderModel(vision_model=__a							,text_model=__a							)

          snake_case			:      List[str]        =			model(input_ids=__a							,pixel_values=__a							,attention_mask=__a							)

          self.assertEqual(output["""text_embeds"""].shape							,(input_ids.shape[0], model.config.projection_dim)							)
          self.assertEqual(output["""image_embeds"""].shape							,(pixel_values.shape[0], model.config.projection_dim)							)







     def 			snake_case_      (				self							,__a							,__a							,__a							,__a							,__a=None							,**__a							)      ->				Tuple:
          snake_case ,		snake_case			:      int        =			self.get_vision_text_model(__a							,__a							)
          snake_case			:      Tuple        =			{"""vision_model""": vision_model, """text_model""": text_model}
          snake_case			:      Optional[Any]        =			TFVisionTextDualEncoderModel.from_vision_text_pretrained(**__a							)

          snake_case			:      str        =			model(input_ids=__a							,pixel_values=__a							,attention_mask=__a							)

          self.assertEqual(output["""text_embeds"""].shape							,(input_ids.shape[0], model.config.projection_dim)							)
          self.assertEqual(output["""image_embeds"""].shape							,(pixel_values.shape[0], model.config.projection_dim)							)







     def 			snake_case_      (				self							,__a							,__a							,__a							,__a							,__a=None							,**__a							)      ->				Optional[int]:
          snake_case ,		snake_case			:      Optional[Any]        =			self.get_vision_text_model(__a							,__a							)
          snake_case			:      Optional[int]        =			TFVisionTextDualEncoderModel(vision_model=__a							,text_model=__a							)

          snake_case			:      List[Any]        =			model(input_ids=__a							,pixel_values=__a							,attention_mask=__a							)
          snake_case			:      Union[str, Any]        =			output[0].numpy()

          with tempfile.TemporaryDirectory() as tmpdirname:
               model.save_pretrained(__a							)
               snake_case			:      Dict        =			TFVisionTextDualEncoderModel.from_pretrained(__a							)

               snake_case			:      Dict        =			model(input_ids=__a							,pixel_values=__a							,attention_mask=__a							)
               snake_case			:      Any        =			after_output[0].numpy()
               snake_case			:      int        =			np.amax(np.abs(out_a - out_a							)							)
               self.assertLessEqual(__a							,1E-5							)







     def 			snake_case_      (				self							,__a							,__a							,__a							,__a							,__a=None							,**__a							)      ->				str:
          snake_case ,		snake_case			:      List[Any]        =			self.get_vision_text_model(__a							,__a							)
          snake_case			:      Tuple        =			TFVisionTextDualEncoderModel(vision_model=__a							,text_model=__a							)

          snake_case			:      Dict        =			model(
              input_ids=__a							,pixel_values=__a							,attention_mask=__a							,output_attentions=__a							)

          snake_case			:      Optional[Any]        =			output.vision_model_output.attentions
          self.assertEqual(len(__a							)							,vision_config.num_hidden_layers							)

          # in ViT, the seq_len equals the number of patches + 1 (we add 1 for the [CLS] token)
          snake_case			:      List[Any]        =			to_atuple(vision_model.config.image_size							)
          snake_case			:      List[Any]        =			to_atuple(vision_model.config.patch_size							)
          snake_case			:      str        =			(image_size[1] // patch_size[1]) * (image_size[0] // patch_size[0])
          snake_case			:      List[str]        =			num_patches + 1
          self.assertEqual(vision_attentions[0].shape[-3:]							,(vision_config.num_attention_heads, seq_len, seq_len)							)

          snake_case			:      Any        =			output.text_model_output.attentions
          self.assertEqual(len(__a							)							,text_config.num_hidden_layers							)

          self.assertEqual(
              text_attentions[0].shape[-3:]							,(text_config.num_attention_heads, input_ids.shape[-1], input_ids.shape[-1])							,)







     def 			snake_case_      (				self							,__a							,__a							,__a							)      ->				Optional[Any]:
          snake_case			:      Union[str, Any]        =			np.abs((a - b)							).max()
          self.assertLessEqual(__a							,__a							,F'''Difference between torch and flax is {diff} (>= {tol}).'''							)







     def 			snake_case_      (				self							)      ->				Union[str, Any]:
          snake_case			:      List[str]        =			self.prepare_config_and_inputs()
          self.check_vision_text_dual_encoder_model(**__a							)







     def 			snake_case_      (				self							)      ->				Tuple:
          snake_case			:      str        =			self.prepare_config_and_inputs()
          self.check_model_from_pretrained_configs(**__a							)







     def 			snake_case_      (				self							)      ->				List[Any]:
          snake_case			:      str        =			self.prepare_config_and_inputs()
          self.check_vision_text_dual_encoder_from_pretrained(**__a							)







     def 			snake_case_      (				self							)      ->				Optional[Any]:
          snake_case			:      List[str]        =			self.prepare_config_and_inputs()
          self.check_save_load(**__a							)







     def 			snake_case_      (				self							)      ->				Union[str, Any]:
          snake_case			:      Optional[Any]        =			self.prepare_config_and_inputs()
          self.check_vision_text_output_attention(**__a							)







     @slow
     def 			snake_case_      (				self							)      ->				List[Any]:
          snake_case ,		snake_case			:      Union[str, Any]        =			self.get_pretrained_model_and_inputs()

          snake_case			:      Any        =			model_a(**__a							)
          snake_case			:      Dict        =			outputs[0].numpy()

          with tempfile.TemporaryDirectory() as tmp_dirname:
               model_a.save_pretrained(__a							)
               snake_case			:      Any        =			TFVisionTextDualEncoderModel.from_pretrained(__a							)

               snake_case			:      str        =			model_a(**__a							)
               snake_case			:      List[Any]        =			after_outputs[0].numpy()
               snake_case			:      Any        =			np.amax(np.abs(out_a - out_a							)							)
               self.assertLessEqual(__a							,1E-5							)







@require_tf
class 					_a (a__,		unittest.TestCase	):





     '''simple docstring'''



     def 			snake_case_      (				self							)      ->				Dict:
          snake_case			:      Tuple        =			TFVisionTextDualEncoderModel.from_vision_text_pretrained(
              """hf-internal-testing/tiny-random-vit"""							,"""hf-internal-testing/tiny-random-bert"""							)
          snake_case			:      Union[str, Any]        =			13
          snake_case			:      Tuple        =			floats_tensor(
              [
                  batch_size,
                  model.vision_model.config.num_channels,
                  model.vision_model.config.image_size,
                  model.vision_model.config.image_size,
              ]							)
          snake_case			:      Optional[Any]        =			ids_tensor([batch_size, 4]							,model.text_model.config.vocab_size							)
          snake_case			:      Any        =			random_attention_mask([batch_size, 4]							)
          snake_case			:      List[str]        =			{"""pixel_values""": pixel_values, """input_ids""": input_ids, """attention_mask""": attention_mask}

          return model, inputs







     def 			snake_case_      (				self							,__a							,__a							)      ->				List[str]:
          snake_case			:      List[str]        =			TFViTModel(__a							,name="""vision_model"""							)
          snake_case			:      Optional[int]        =			TFBertModel(__a							,name="""text_model"""							)
          return vision_model, text_model







     def 			snake_case_      (				self							)      ->				Tuple:
          snake_case			:      Any        =			TFViTModelTester(self							)
          snake_case			:      Tuple        =			TFBertModelTester(self							)
          snake_case			:      Any        =			vit_model_tester.prepare_config_and_inputs()
          snake_case			:      Union[str, Any]        =			bert_model_tester.prepare_config_and_inputs()

          snake_case ,		snake_case ,		snake_case			:      Union[str, Any]        =			vision_config_and_inputs

          (
              (
              snake_case
          ) ,		(
              snake_case
          ) ,		(
              snake_case
          ) ,		(
              snake_case
          ) ,		(
              snake_case
          ) ,		(
              snake_case
          ) ,		(
              snake_case
          ) ,		
          )			:      List[str]        =			text_config_and_inputs

          return {
              "text_config": text_config,
              "vision_config": vision_config,
              "pixel_values": pixel_values,
              "attention_mask": input_mask,
              "input_ids": input_ids,
              "text_token_type_ids": token_type_ids,
              "text_sequence_labels": sequence_labels,
              "text_token_labels": token_labels,
              "text_choice_labels": choice_labels,
          }







@require_tf
class 					_a (a__,		unittest.TestCase	):





     '''simple docstring'''



     def 			snake_case_      (				self							)      ->				List[Any]:
          # DeiT repo doesn't have TF weights, but we don't actually use the weights at all so let's
          # just reinitialize it.
          snake_case			:      Optional[int]        =			TFVisionTextDualEncoderModel.from_vision_text_pretrained(
              """Rocketknight1/tiny-random-deit-tf"""							,"""hf-internal-testing/tiny-random-roberta"""							)
          snake_case			:      List[str]        =			13
          snake_case			:      Optional[int]        =			floats_tensor(
              [
                  batch_size,
                  model.vision_model.config.num_channels,
                  model.vision_model.config.image_size,
                  model.vision_model.config.image_size,
              ]							)
          snake_case			:      Tuple        =			ids_tensor([batch_size, 4]							,model.text_model.config.vocab_size							)
          snake_case			:      List[Any]        =			random_attention_mask([batch_size, 4]							)
          snake_case			:      Dict        =			{"""pixel_values""": pixel_values, """input_ids""": input_ids, """attention_mask""": attention_mask}

          return model, inputs







     def 			snake_case_      (				self							,__a							,__a							,__a							,__a							,__a=None							,**__a							)      ->				Tuple:
          snake_case ,		snake_case			:      Optional[int]        =			self.get_vision_text_model(__a							,__a							)
          snake_case			:      Optional[Any]        =			TFVisionTextDualEncoderModel(vision_model=__a							,text_model=__a							)

          snake_case			:      Dict        =			model(
              input_ids=__a							,pixel_values=__a							,attention_mask=__a							,output_attentions=__a							)

          snake_case			:      List[Any]        =			output.vision_model_output.attentions
          self.assertEqual(len(__a							)							,vision_config.num_hidden_layers							)

          # in DEiT, the seq_len equals the number of patches + 2 (we add 2 for the [CLS] and distillation tokens)
          snake_case			:      Optional[int]        =			to_atuple(vision_model.config.image_size							)
          snake_case			:      Tuple        =			to_atuple(vision_model.config.patch_size							)
          snake_case			:      Tuple        =			(image_size[1] // patch_size[1]) * (image_size[0] // patch_size[0])
          snake_case			:      str        =			num_patches + 2
          self.assertEqual(vision_attentions[0].shape[-3:]							,(vision_config.num_attention_heads, seq_len, seq_len)							)

          snake_case			:      str        =			output.text_model_output.attentions
          self.assertEqual(len(__a							)							,text_config.num_hidden_layers							)

          self.assertEqual(
              text_attentions[0].shape[-3:]							,(text_config.num_attention_heads, input_ids.shape[-1], input_ids.shape[-1])							,)







     def 			snake_case_      (				self							,__a							,__a							)      ->				str:
          snake_case			:      Dict        =			TFDeiTModel(__a							,name="""vision_model"""							)
          snake_case			:      Union[str, Any]        =			TFRobertaModel(__a							,name="""text_model"""							)
          return vision_model, text_model







     def 			snake_case_      (				self							)      ->				str:
          snake_case			:      List[str]        =			TFDeiTModelTester(self							)
          snake_case			:      List[str]        =			TFRobertaModelTester(self							)
          snake_case			:      str        =			vit_model_tester.prepare_config_and_inputs()
          snake_case			:      List[str]        =			bert_model_tester.prepare_config_and_inputs()

          snake_case ,		snake_case ,		snake_case			:      Optional[int]        =			vision_config_and_inputs

          (
              (
              snake_case
          ) ,		(
              snake_case
          ) ,		(
              snake_case
          ) ,		(
              snake_case
          ) ,		(
              snake_case
          ) ,		(
              snake_case
          ) ,		(
              snake_case
          ) ,		
          )			:      Optional[int]        =			text_config_and_inputs

          return {
              "text_config": text_config,
              "vision_config": vision_config,
              "pixel_values": pixel_values,
              "attention_mask": input_mask,
              "input_ids": input_ids,
              "text_token_type_ids": token_type_ids,
              "text_sequence_labels": sequence_labels,
              "text_token_labels": token_labels,
              "text_choice_labels": choice_labels,
          }







@require_tf
class 					_a (a__,		unittest.TestCase	):





     '''simple docstring'''



     def 			snake_case_      (				self							)      ->				Any:
          snake_case			:      Tuple        =			TFVisionTextDualEncoderModel.from_vision_text_pretrained(
              """Rocketknight1/tiny-random-clip-tf"""							,"""hf-internal-testing/tiny-random-bert"""							)
          snake_case			:      List[str]        =			13
          snake_case			:      Tuple        =			floats_tensor(
              [
                  batch_size,
                  model.vision_model.config.num_channels,
                  model.vision_model.config.image_size,
                  model.vision_model.config.image_size,
              ]							)
          snake_case			:      Optional[Any]        =			ids_tensor([batch_size, 4]							,model.text_model.config.vocab_size							)
          snake_case			:      str        =			random_attention_mask([batch_size, 4]							)
          snake_case			:      Tuple        =			{"""pixel_values""": pixel_values, """input_ids""": input_ids, """attention_mask""": attention_mask}

          return model, inputs







     def 			snake_case_      (				self							,__a							,__a							)      ->				List[Any]:
          snake_case			:      Tuple        =			TFCLIPVisionModel(__a							,name="""vision_model"""							)
          snake_case			:      Optional[int]        =			TFBertModel(__a							,name="""text_model"""							)
          return vision_model, text_model







     def 			snake_case_      (				self							)      ->				Union[str, Any]:
          snake_case			:      Any        =			TFCLIPVisionModelTester(self							)
          snake_case			:      List[Any]        =			TFBertModelTester(self							)
          snake_case			:      str        =			clip_model_tester.prepare_config_and_inputs()
          snake_case			:      Optional[Any]        =			bert_model_tester.prepare_config_and_inputs()

          snake_case ,		snake_case			:      Dict        =			vision_config_and_inputs

          (
              (
              snake_case
          ) ,		(
              snake_case
          ) ,		(
              snake_case
          ) ,		(
              snake_case
          ) ,		(
              snake_case
          ) ,		(
              snake_case
          ) ,		(
              snake_case
          ) ,		
          )			:      List[Any]        =			text_config_and_inputs

          return {
              "text_config": text_config,
              "vision_config": vision_config,
              "pixel_values": pixel_values,
              "attention_mask": input_mask,
              "input_ids": input_ids,
              "text_token_type_ids": token_type_ids,
              "text_sequence_labels": sequence_labels,
              "text_token_labels": token_labels,
              "text_choice_labels": choice_labels,
          }







@require_vision
@require_tf
class 					_a (unittest.TestCase	):





     '''simple docstring'''



     @slow
     def 			snake_case_      (				self							)      ->				List[str]:
          snake_case			:      List[str]        =			TFVisionTextDualEncoderModel.from_pretrained(
              """clip-italian/clip-italian"""							,logit_scale_init_value=1.0							,from_pt=__a							)
          snake_case			:      Dict        =			VisionTextDualEncoderProcessor.from_pretrained("""clip-italian/clip-italian"""							)

          snake_case			:      Tuple        =			Image.open("""./tests/fixtures/tests_samples/COCO/000000039769.png"""							)
          snake_case			:      str        =			processor(
              text=["""una foto di un gatto""", """una foto di un cane"""]							,images=__a							,padding=__a							,return_tensors="""np"""							)

          snake_case			:      Any        =			model(**__a							)

          # verify the logits
          self.assertEqual(outputs.logits_per_image.shape							,(inputs.pixel_values.shape[0], inputs.input_ids.shape[0])							)
          self.assertEqual(
              outputs.logits_per_text.shape							,(inputs.input_ids.shape[0], inputs.pixel_values.shape[0])							,)

          snake_case			:      Any        =			np.array([[1.2_284_727, 0.3_104_122]]							)

          self.assertTrue(np.allclose(outputs.logits_per_image.numpy()							,__a							,atol=1E-3							)							)









'''simple docstring'''







from ..utils import DummyObject, requires_backends







class 					_a (metaclass=a__	):





     '''simple docstring'''



     lowerCAmelCase_  :     Any          =					["""flax"""]







     def __init__(				self							,*__a							,**__a							)      ->				Tuple:
          requires_backends(self							,["""flax"""]							)







     @classmethod
     def 			snake_case_      (				cls							,*__a							,**__a							)      ->				Tuple:
          requires_backends(cls							,["""flax"""]							)







     @classmethod
     def 			snake_case_      (				cls							,*__a							,**__a							)      ->				Dict:
          requires_backends(cls							,["""flax"""]							)







class 					_a (metaclass=a__	):





     '''simple docstring'''



     lowerCAmelCase_  :     Optional[int]          =					["""flax"""]







     def __init__(				self							,*__a							,**__a							)      ->				List[Any]:
          requires_backends(self							,["""flax"""]							)







     @classmethod
     def 			snake_case_      (				cls							,*__a							,**__a							)      ->				List[str]:
          requires_backends(cls							,["""flax"""]							)







     @classmethod
     def 			snake_case_      (				cls							,*__a							,**__a							)      ->				str:
          requires_backends(cls							,["""flax"""]							)







class 					_a (metaclass=a__	):





     '''simple docstring'''



     lowerCAmelCase_  :     Any          =					["""flax"""]







     def __init__(				self							,*__a							,**__a							)      ->				Any:
          requires_backends(self							,["""flax"""]							)







     @classmethod
     def 			snake_case_      (				cls							,*__a							,**__a							)      ->				List[Any]:
          requires_backends(cls							,["""flax"""]							)







     @classmethod
     def 			snake_case_      (				cls							,*__a							,**__a							)      ->				Any:
          requires_backends(cls							,["""flax"""]							)







class 					_a (metaclass=a__	):





     '''simple docstring'''



     lowerCAmelCase_  :     List[str]          =					["""flax"""]







     def __init__(				self							,*__a							,**__a							)      ->				Optional[Any]:
          requires_backends(self							,["""flax"""]							)







     @classmethod
     def 			snake_case_      (				cls							,*__a							,**__a							)      ->				Dict:
          requires_backends(cls							,["""flax"""]							)







     @classmethod
     def 			snake_case_      (				cls							,*__a							,**__a							)      ->				int:
          requires_backends(cls							,["""flax"""]							)







class 					_a (metaclass=a__	):





     '''simple docstring'''



     lowerCAmelCase_  :     int          =					["""flax"""]







     def __init__(				self							,*__a							,**__a							)      ->				Optional[int]:
          requires_backends(self							,["""flax"""]							)







     @classmethod
     def 			snake_case_      (				cls							,*__a							,**__a							)      ->				Optional[Any]:
          requires_backends(cls							,["""flax"""]							)







     @classmethod
     def 			snake_case_      (				cls							,*__a							,**__a							)      ->				List[str]:
          requires_backends(cls							,["""flax"""]							)







class 					_a (metaclass=a__	):





     '''simple docstring'''



     lowerCAmelCase_  :     Dict          =					["""flax"""]







     def __init__(				self							,*__a							,**__a							)      ->				Optional[Any]:
          requires_backends(self							,["""flax"""]							)







     @classmethod
     def 			snake_case_      (				cls							,*__a							,**__a							)      ->				List[Any]:
          requires_backends(cls							,["""flax"""]							)







     @classmethod
     def 			snake_case_      (				cls							,*__a							,**__a							)      ->				int:
          requires_backends(cls							,["""flax"""]							)







class 					_a (metaclass=a__	):





     '''simple docstring'''



     lowerCAmelCase_  :     Union[str, Any]          =					["""flax"""]







     def __init__(				self							,*__a							,**__a							)      ->				List[str]:
          requires_backends(self							,["""flax"""]							)







     @classmethod
     def 			snake_case_      (				cls							,*__a							,**__a							)      ->				Optional[Any]:
          requires_backends(cls							,["""flax"""]							)







     @classmethod
     def 			snake_case_      (				cls							,*__a							,**__a							)      ->				str:
          requires_backends(cls							,["""flax"""]							)







class 					_a (metaclass=a__	):





     '''simple docstring'''



     lowerCAmelCase_  :     Optional[Any]          =					["""flax"""]







     def __init__(				self							,*__a							,**__a							)      ->				str:
          requires_backends(self							,["""flax"""]							)







     @classmethod
     def 			snake_case_      (				cls							,*__a							,**__a							)      ->				str:
          requires_backends(cls							,["""flax"""]							)







     @classmethod
     def 			snake_case_      (				cls							,*__a							,**__a							)      ->				Union[str, Any]:
          requires_backends(cls							,["""flax"""]							)







class 					_a (metaclass=a__	):





     '''simple docstring'''



     lowerCAmelCase_  :     List[Any]          =					["""flax"""]







     def __init__(				self							,*__a							,**__a							)      ->				Union[str, Any]:
          requires_backends(self							,["""flax"""]							)







     @classmethod
     def 			snake_case_      (				cls							,*__a							,**__a							)      ->				Any:
          requires_backends(cls							,["""flax"""]							)







     @classmethod
     def 			snake_case_      (				cls							,*__a							,**__a							)      ->				Optional[Any]:
          requires_backends(cls							,["""flax"""]							)







class 					_a (metaclass=a__	):





     '''simple docstring'''



     lowerCAmelCase_  :     Dict          =					["""flax"""]







     def __init__(				self							,*__a							,**__a							)      ->				Dict:
          requires_backends(self							,["""flax"""]							)







     @classmethod
     def 			snake_case_      (				cls							,*__a							,**__a							)      ->				List[str]:
          requires_backends(cls							,["""flax"""]							)







     @classmethod
     def 			snake_case_      (				cls							,*__a							,**__a							)      ->				Optional[Any]:
          requires_backends(cls							,["""flax"""]							)







class 					_a (metaclass=a__	):





     '''simple docstring'''



     lowerCAmelCase_  :     List[str]          =					["""flax"""]







     def __init__(				self							,*__a							,**__a							)      ->				Tuple:
          requires_backends(self							,["""flax"""]							)







     @classmethod
     def 			snake_case_      (				cls							,*__a							,**__a							)      ->				Tuple:
          requires_backends(cls							,["""flax"""]							)







     @classmethod
     def 			snake_case_      (				cls							,*__a							,**__a							)      ->				Optional[int]:
          requires_backends(cls							,["""flax"""]							)







class 					_a (metaclass=a__	):





     '''simple docstring'''



     lowerCAmelCase_  :     Tuple          =					["""flax"""]







     def __init__(				self							,*__a							,**__a							)      ->				List[str]:
          requires_backends(self							,["""flax"""]							)







     @classmethod
     def 			snake_case_      (				cls							,*__a							,**__a							)      ->				Union[str, Any]:
          requires_backends(cls							,["""flax"""]							)







     @classmethod
     def 			snake_case_      (				cls							,*__a							,**__a							)      ->				Dict:
          requires_backends(cls							,["""flax"""]							)







class 					_a (metaclass=a__	):





     '''simple docstring'''



     lowerCAmelCase_  :     Tuple          =					["""flax"""]







     def __init__(				self							,*__a							,**__a							)      ->				Tuple:
          requires_backends(self							,["""flax"""]							)







     @classmethod
     def 			snake_case_      (				cls							,*__a							,**__a							)      ->				List[str]:
          requires_backends(cls							,["""flax"""]							)







     @classmethod
     def 			snake_case_      (				cls							,*__a							,**__a							)      ->				int:
          requires_backends(cls							,["""flax"""]							)



