



"""simple docstring"""





import shutil
import tempfile
import unittest

import numpy as np

from transformers.testing_utils import (
    is_pt_tf_cross_test,
    require_tf,
    require_torch,
    require_torchvision,
    require_vision,
)
from transformers.utils import is_tf_available, is_torch_available, is_vision_available


if is_vision_available():
  from PIL import Image

  from transformers import AutoProcessor, SamImageProcessor, SamProcessor

if is_torch_available():
  import torch

if is_tf_available():
  import tensorflow as tf
@require_vision
@require_torchvision
class 				lowercase__       (   unittest.TestCase				):







       '''simple docstring'''


       def 					lowercase__    (							self      :  Optional[int]   )			->						List[Any]:


             '''simple docstring'''




             UpperCAmelCase_      			=							tempfile.mkdtemp()
             UpperCAmelCase_      			=							SamImageProcessor()
             UpperCAmelCase_      			=							SamProcessor(_UpperCAmelCase   )
             processor.save_pretrained(self.tmpdirname   )



       def 					lowercase__    (							self      :  Any		,    **_UpperCAmelCase      :  int   )			->						Optional[int]:


             '''simple docstring'''




             return AutoProcessor.from_pretrained(self.tmpdirname		,    **_UpperCAmelCase   ).image_processor



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


             '''simple docstring'''




             shutil.rmtree(self.tmpdirname   )



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


             '''simple docstring'''




             UpperCAmelCase_      			=							[np.random.randint(255		,    size=(3, 30, 400)		,    dtype=np.uinta   )]

             UpperCAmelCase_      			=							[Image.fromarray(np.moveaxis(_UpperCAmelCase		,    0		,    -1   )   ) for x in image_inputs]

             return image_inputs



       def 					lowercase__    (							self      :  Dict   )			->						Any:


             '''simple docstring'''




             UpperCAmelCase_      			=							SamProcessor(image_processor=self.get_image_processor()   )
             processor.save_pretrained(self.tmpdirname   )

             UpperCAmelCase_      			=							self.get_image_processor(do_normalize=_UpperCAmelCase		,    padding_value=1.0   )

             UpperCAmelCase_      			=							SamProcessor.from_pretrained(self.tmpdirname		,    do_normalize=_UpperCAmelCase		,    padding_value=1.0   )

             self.assertEqual(processor.image_processor.to_json_string()		,    image_processor_add_kwargs.to_json_string()   )
             self.assertIsInstance(processor.image_processor		,    _UpperCAmelCase   )



       def 					lowercase__    (							self      :  Optional[Any]   )			->						int:


             '''simple docstring'''




             UpperCAmelCase_      			=							self.get_image_processor()

             UpperCAmelCase_      			=							SamProcessor(image_processor=_UpperCAmelCase   )

             UpperCAmelCase_      			=							self.prepare_image_inputs()

             UpperCAmelCase_      			=							image_processor(_UpperCAmelCase		,    return_tensors="np"   )
             UpperCAmelCase_      			=							processor(images=_UpperCAmelCase		,    return_tensors="np"   )

             input_feat_extract.pop("original_sizes"   )  # pop original_sizes as it is popped in the processor
             input_feat_extract.pop("reshaped_input_sizes"   )  # pop original_sizes as it is popped in the processor

             for key in input_feat_extract.keys():
                   self.assertAlmostEqual(input_feat_extract[key].sum()		,    input_processor[key].sum()		,    delta=1e-2   )







       @require_torch
       def 					lowercase__    (							self      :  Tuple   )			->						Tuple:


             '''simple docstring'''




             UpperCAmelCase_      			=							self.get_image_processor()

             UpperCAmelCase_      			=							SamProcessor(image_processor=_UpperCAmelCase   )
             UpperCAmelCase_      			=							[torch.ones((1, 3, 5, 5)   )]

             UpperCAmelCase_      			=							[[1764, 2646]]

             UpperCAmelCase_      			=							[[683, 1024]]
             UpperCAmelCase_      			=							processor.post_process_masks(_UpperCAmelCase		,    _UpperCAmelCase		,    _UpperCAmelCase   )
             self.assertEqual(masks[0].shape		,    (1, 3, 1764, 2646)   )

             UpperCAmelCase_      			=							processor.post_process_masks(
                 _UpperCAmelCase		,    torch.tensor(_UpperCAmelCase   )		,    torch.tensor(_UpperCAmelCase   )   )
             self.assertEqual(masks[0].shape		,    (1, 3, 1764, 2646)   )

             # should also work with np
             UpperCAmelCase_      			=							[np.ones((1, 3, 5, 5)   )]
             UpperCAmelCase_      			=							processor.post_process_masks(_UpperCAmelCase		,    np.array(_UpperCAmelCase   )		,    np.array(_UpperCAmelCase   )   )

             self.assertEqual(masks[0].shape		,    (1, 3, 1764, 2646)   )

             UpperCAmelCase_      			=							[[1, 0], [0, 1]]
             with self.assertRaises(_UpperCAmelCase   ):
                   UpperCAmelCase_      			=							processor.post_process_masks(_UpperCAmelCase		,    np.array(_UpperCAmelCase   )		,    np.array(_UpperCAmelCase   )   )



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







       '''simple docstring'''


       def 					lowercase__    (							self      :  List[Any]   )			->						Optional[Any]:


             '''simple docstring'''




             UpperCAmelCase_      			=							tempfile.mkdtemp()
             UpperCAmelCase_      			=							SamImageProcessor()
             UpperCAmelCase_      			=							SamProcessor(_UpperCAmelCase   )
             processor.save_pretrained(self.tmpdirname   )



       def 					lowercase__    (							self      :  str		,    **_UpperCAmelCase      :  str   )			->						int:


             '''simple docstring'''




             return AutoProcessor.from_pretrained(self.tmpdirname		,    **_UpperCAmelCase   ).image_processor



       def 					lowercase__    (							self      :  Dict   )			->						str:


             '''simple docstring'''




             shutil.rmtree(self.tmpdirname   )



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


             '''simple docstring'''




             UpperCAmelCase_      			=							[np.random.randint(255		,    size=(3, 30, 400)		,    dtype=np.uinta   )]

             UpperCAmelCase_      			=							[Image.fromarray(np.moveaxis(_UpperCAmelCase		,    0		,    -1   )   ) for x in image_inputs]

             return image_inputs



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


             '''simple docstring'''




             UpperCAmelCase_      			=							SamProcessor(image_processor=self.get_image_processor()   )
             processor.save_pretrained(self.tmpdirname   )

             UpperCAmelCase_      			=							self.get_image_processor(do_normalize=_UpperCAmelCase		,    padding_value=1.0   )

             UpperCAmelCase_      			=							SamProcessor.from_pretrained(self.tmpdirname		,    do_normalize=_UpperCAmelCase		,    padding_value=1.0   )

             self.assertEqual(processor.image_processor.to_json_string()		,    image_processor_add_kwargs.to_json_string()   )
             self.assertIsInstance(processor.image_processor		,    _UpperCAmelCase   )



       def 					lowercase__    (							self      :  List[Any]   )			->						int:


             '''simple docstring'''




             UpperCAmelCase_      			=							self.get_image_processor()

             UpperCAmelCase_      			=							SamProcessor(image_processor=_UpperCAmelCase   )

             UpperCAmelCase_      			=							self.prepare_image_inputs()

             UpperCAmelCase_      			=							image_processor(_UpperCAmelCase		,    return_tensors="np"   )
             UpperCAmelCase_      			=							processor(images=_UpperCAmelCase		,    return_tensors="np"   )

             input_feat_extract.pop("original_sizes"   )  # pop original_sizes as it is popped in the processor
             input_feat_extract.pop("reshaped_input_sizes"   )  # pop reshaped_input_sizes as it is popped in the processor

             for key in input_feat_extract.keys():
                   self.assertAlmostEqual(input_feat_extract[key].sum()		,    input_processor[key].sum()		,    delta=1e-2   )







       @require_tf
       def 					lowercase__    (							self      :  Dict   )			->						Optional[Any]:


             '''simple docstring'''




             UpperCAmelCase_      			=							self.get_image_processor()

             UpperCAmelCase_      			=							SamProcessor(image_processor=_UpperCAmelCase   )
             UpperCAmelCase_      			=							[tf.ones((1, 3, 5, 5)   )]

             UpperCAmelCase_      			=							[[1764, 2646]]

             UpperCAmelCase_      			=							[[683, 1024]]
             UpperCAmelCase_      			=							processor.post_process_masks(_UpperCAmelCase		,    _UpperCAmelCase		,    _UpperCAmelCase		,    return_tensors="tf"   )
             self.assertEqual(masks[0].shape		,    (1, 3, 1764, 2646)   )

             UpperCAmelCase_      			=							processor.post_process_masks(
                 _UpperCAmelCase		,    tf.convert_to_tensor(_UpperCAmelCase   )		,    tf.convert_to_tensor(_UpperCAmelCase   )		,    return_tensors="tf"		,    )
             self.assertEqual(masks[0].shape		,    (1, 3, 1764, 2646)   )

             # should also work with np
             UpperCAmelCase_      			=							[np.ones((1, 3, 5, 5)   )]
             UpperCAmelCase_      			=							processor.post_process_masks(
                 _UpperCAmelCase		,    np.array(_UpperCAmelCase   )		,    np.array(_UpperCAmelCase   )		,    return_tensors="tf"   )

             self.assertEqual(masks[0].shape		,    (1, 3, 1764, 2646)   )

             UpperCAmelCase_      			=							[[1, 0], [0, 1]]
             with self.assertRaises(tf.errors.InvalidArgumentError   ):
                   UpperCAmelCase_      			=							processor.post_process_masks(
                       _UpperCAmelCase		,    np.array(_UpperCAmelCase   )		,    np.array(_UpperCAmelCase   )		,    return_tensors="tf"   )



@require_vision
@require_torchvision
class 				lowercase__       (   unittest.TestCase				):







       '''simple docstring'''


       def 					lowercase__    (							self      :  Any   )			->						int:


             '''simple docstring'''




             UpperCAmelCase_      			=							tempfile.mkdtemp()
             UpperCAmelCase_      			=							SamImageProcessor()
             UpperCAmelCase_      			=							SamProcessor(_UpperCAmelCase   )
             processor.save_pretrained(self.tmpdirname   )



       def 					lowercase__    (							self      :  Optional[Any]		,    **_UpperCAmelCase      :  Any   )			->						Optional[Any]:


             '''simple docstring'''




             return AutoProcessor.from_pretrained(self.tmpdirname		,    **_UpperCAmelCase   ).image_processor



       def 					lowercase__    (							self      :  Dict   )			->						Dict:


             '''simple docstring'''




             shutil.rmtree(self.tmpdirname   )



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


             '''simple docstring'''




             UpperCAmelCase_      			=							[np.random.randint(255		,    size=(3, 30, 400)		,    dtype=np.uinta   )]

             UpperCAmelCase_      			=							[Image.fromarray(np.moveaxis(_UpperCAmelCase		,    0		,    -1   )   ) for x in image_inputs]

             return image_inputs



       @is_pt_tf_cross_test
       def 					lowercase__    (							self      :  Optional[Any]   )			->						str:


             '''simple docstring'''




             UpperCAmelCase_      			=							self.get_image_processor()

             UpperCAmelCase_      			=							SamProcessor(image_processor=_UpperCAmelCase   )
             UpperCAmelCase_      			=							np.random.randint(0		,    2		,    size=(1, 3, 5, 5)   ).astype(np.floataa   )
             UpperCAmelCase_      			=							[tf.convert_to_tensor(_UpperCAmelCase   )]
             UpperCAmelCase_      			=							[torch.tensor(_UpperCAmelCase   )]

             UpperCAmelCase_      			=							[[1764, 2646]]

             UpperCAmelCase_      			=							[[683, 1024]]
             UpperCAmelCase_      			=							processor.post_process_masks(
                 _UpperCAmelCase		,    _UpperCAmelCase		,    _UpperCAmelCase		,    return_tensors="tf"   )
             UpperCAmelCase_      			=							processor.post_process_masks(
                 _UpperCAmelCase		,    _UpperCAmelCase		,    _UpperCAmelCase		,    return_tensors="pt"   )

             self.assertTrue(np.all(tf_masks[0].numpy() == pt_masks[0].numpy()   )   )







       @is_pt_tf_cross_test
       def 					lowercase__    (							self      :  Union[str, Any]   )			->						Union[str, Any]:


             '''simple docstring'''




             UpperCAmelCase_      			=							self.get_image_processor()

             UpperCAmelCase_      			=							SamProcessor(image_processor=_UpperCAmelCase   )

             UpperCAmelCase_      			=							self.prepare_image_inputs()

             UpperCAmelCase_      			=							image_processor(_UpperCAmelCase		,    return_tensors="pt"   )["pixel_values"].numpy()
             UpperCAmelCase_      			=							processor(images=_UpperCAmelCase		,    return_tensors="pt"   )["pixel_values"].numpy()

             UpperCAmelCase_      			=							image_processor(_UpperCAmelCase		,    return_tensors="tf"   )["pixel_values"].numpy()
             UpperCAmelCase_      			=							processor(images=_UpperCAmelCase		,    return_tensors="tf"   )["pixel_values"].numpy()

             self.assertTrue(np.allclose(_UpperCAmelCase		,    _UpperCAmelCase   )   )
             self.assertTrue(np.allclose(_UpperCAmelCase		,    _UpperCAmelCase   )   )
             self.assertTrue(np.allclose(_UpperCAmelCase		,    _UpperCAmelCase   )   )









"""simple docstring"""





from ..utils import DummyObject, requires_backends
class 				lowercase__       (   metaclass=SCREAMING_SNAKE_CASE				):







       '''simple docstring'''


       UpperCamelCase						=					['''flax''']



       def __init__(							self      :  Tuple		,    *_UpperCAmelCase      :  str		,    **_UpperCAmelCase      :  Any   )			->						List[str]:


             '''simple docstring'''




             requires_backends(self		,    ["flax"]   )



       @classmethod
       def 					lowercase__    (							cls      :  List[Any]		,    *_UpperCAmelCase      :  Dict		,    **_UpperCAmelCase      :  Tuple   )			->						List[Any]:


             '''simple docstring'''




             requires_backends(cls		,    ["flax"]   )







       @classmethod
       def 					lowercase__    (							cls      :  List[Any]		,    *_UpperCAmelCase      :  List[Any]		,    **_UpperCAmelCase      :  str   )			->						int:


             '''simple docstring'''




             requires_backends(cls		,    ["flax"]   )



class 				lowercase__       (   metaclass=SCREAMING_SNAKE_CASE				):







       '''simple docstring'''


       UpperCamelCase						=					['''flax''']



       def __init__(							self      :  Union[str, Any]		,    *_UpperCAmelCase      :  Any		,    **_UpperCAmelCase      :  Tuple   )			->						str:


             '''simple docstring'''




             requires_backends(self		,    ["flax"]   )



       @classmethod
       def 					lowercase__    (							cls      :  str		,    *_UpperCAmelCase      :  Optional[int]		,    **_UpperCAmelCase      :  int   )			->						Any:


             '''simple docstring'''




             requires_backends(cls		,    ["flax"]   )







       @classmethod
       def 					lowercase__    (							cls      :  List[str]		,    *_UpperCAmelCase      :  Optional[Any]		,    **_UpperCAmelCase      :  Optional[int]   )			->						Dict:


             '''simple docstring'''




             requires_backends(cls		,    ["flax"]   )



class 				lowercase__       (   metaclass=SCREAMING_SNAKE_CASE				):







       '''simple docstring'''


       UpperCamelCase						=					['''flax''']



       def __init__(							self      :  Union[str, Any]		,    *_UpperCAmelCase      :  Dict		,    **_UpperCAmelCase      :  Dict   )			->						str:


             '''simple docstring'''




             requires_backends(self		,    ["flax"]   )



       @classmethod
       def 					lowercase__    (							cls      :  Optional[int]		,    *_UpperCAmelCase      :  int		,    **_UpperCAmelCase      :  List[Any]   )			->						List[str]:


             '''simple docstring'''




             requires_backends(cls		,    ["flax"]   )







       @classmethod
       def 					lowercase__    (							cls      :  Dict		,    *_UpperCAmelCase      :  Dict		,    **_UpperCAmelCase      :  Union[str, Any]   )			->						int:


             '''simple docstring'''




             requires_backends(cls		,    ["flax"]   )



class 				lowercase__       (   metaclass=SCREAMING_SNAKE_CASE				):







       '''simple docstring'''


       UpperCamelCase						=					['''flax''']



       def __init__(							self      :  Any		,    *_UpperCAmelCase      :  str		,    **_UpperCAmelCase      :  Tuple   )			->						Optional[int]:


             '''simple docstring'''




             requires_backends(self		,    ["flax"]   )



       @classmethod
       def 					lowercase__    (							cls      :  str		,    *_UpperCAmelCase      :  Optional[Any]		,    **_UpperCAmelCase      :  List[str]   )			->						str:


             '''simple docstring'''




             requires_backends(cls		,    ["flax"]   )







       @classmethod
       def 					lowercase__    (							cls      :  int		,    *_UpperCAmelCase      :  Any		,    **_UpperCAmelCase      :  int   )			->						Dict:


             '''simple docstring'''




             requires_backends(cls		,    ["flax"]   )



class 				lowercase__       (   metaclass=SCREAMING_SNAKE_CASE				):







       '''simple docstring'''


       UpperCamelCase						=					['''flax''']



       def __init__(							self      :  str		,    *_UpperCAmelCase      :  int		,    **_UpperCAmelCase      :  Dict   )			->						Tuple:


             '''simple docstring'''




             requires_backends(self		,    ["flax"]   )



       @classmethod
       def 					lowercase__    (							cls      :  Optional[Any]		,    *_UpperCAmelCase      :  List[str]		,    **_UpperCAmelCase      :  List[Any]   )			->						List[Any]:


             '''simple docstring'''




             requires_backends(cls		,    ["flax"]   )







       @classmethod
       def 					lowercase__    (							cls      :  List[Any]		,    *_UpperCAmelCase      :  int		,    **_UpperCAmelCase      :  int   )			->						Optional[Any]:


             '''simple docstring'''




             requires_backends(cls		,    ["flax"]   )



class 				lowercase__       (   metaclass=SCREAMING_SNAKE_CASE				):







       '''simple docstring'''


       UpperCamelCase						=					['''flax''']



       def __init__(							self      :  Dict		,    *_UpperCAmelCase      :  Any		,    **_UpperCAmelCase      :  Optional[Any]   )			->						int:


             '''simple docstring'''




             requires_backends(self		,    ["flax"]   )



       @classmethod
       def 					lowercase__    (							cls      :  List[Any]		,    *_UpperCAmelCase      :  str		,    **_UpperCAmelCase      :  List[str]   )			->						Any:


             '''simple docstring'''




             requires_backends(cls		,    ["flax"]   )







       @classmethod
       def 					lowercase__    (							cls      :  List[str]		,    *_UpperCAmelCase      :  str		,    **_UpperCAmelCase      :  Optional[Any]   )			->						Tuple:


             '''simple docstring'''




             requires_backends(cls		,    ["flax"]   )



class 				lowercase__       (   metaclass=SCREAMING_SNAKE_CASE				):







       '''simple docstring'''


       UpperCamelCase						=					['''flax''']



       def __init__(							self      :  Union[str, Any]		,    *_UpperCAmelCase      :  Optional[int]		,    **_UpperCAmelCase      :  Tuple   )			->						str:


             '''simple docstring'''




             requires_backends(self		,    ["flax"]   )



       @classmethod
       def 					lowercase__    (							cls      :  str		,    *_UpperCAmelCase      :  Union[str, Any]		,    **_UpperCAmelCase      :  Union[str, Any]   )			->						List[str]:


             '''simple docstring'''




             requires_backends(cls		,    ["flax"]   )







       @classmethod
       def 					lowercase__    (							cls      :  List[Any]		,    *_UpperCAmelCase      :  Optional[int]		,    **_UpperCAmelCase      :  Optional[Any]   )			->						str:


             '''simple docstring'''




             requires_backends(cls		,    ["flax"]   )



class 				lowercase__       (   metaclass=SCREAMING_SNAKE_CASE				):







       '''simple docstring'''


       UpperCamelCase						=					['''flax''']



       def __init__(							self      :  Optional[Any]		,    *_UpperCAmelCase      :  str		,    **_UpperCAmelCase      :  int   )			->						Union[str, Any]:


             '''simple docstring'''




             requires_backends(self		,    ["flax"]   )



       @classmethod
       def 					lowercase__    (							cls      :  Union[str, Any]		,    *_UpperCAmelCase      :  Optional[Any]		,    **_UpperCAmelCase      :  List[Any]   )			->						str:


             '''simple docstring'''




             requires_backends(cls		,    ["flax"]   )







       @classmethod
       def 					lowercase__    (							cls      :  List[Any]		,    *_UpperCAmelCase      :  Dict		,    **_UpperCAmelCase      :  str   )			->						List[str]:


             '''simple docstring'''




             requires_backends(cls		,    ["flax"]   )



class 				lowercase__       (   metaclass=SCREAMING_SNAKE_CASE				):







       '''simple docstring'''


       UpperCamelCase						=					['''flax''']



       def __init__(							self      :  List[str]		,    *_UpperCAmelCase      :  Optional[int]		,    **_UpperCAmelCase      :  Optional[int]   )			->						Tuple:


             '''simple docstring'''




             requires_backends(self		,    ["flax"]   )



       @classmethod
       def 					lowercase__    (							cls      :  Union[str, Any]		,    *_UpperCAmelCase      :  Optional[int]		,    **_UpperCAmelCase      :  str   )			->						Union[str, Any]:


             '''simple docstring'''




             requires_backends(cls		,    ["flax"]   )







       @classmethod
       def 					lowercase__    (							cls      :  Optional[int]		,    *_UpperCAmelCase      :  Any		,    **_UpperCAmelCase      :  List[str]   )			->						Optional[int]:


             '''simple docstring'''




             requires_backends(cls		,    ["flax"]   )



class 				lowercase__       (   metaclass=SCREAMING_SNAKE_CASE				):







       '''simple docstring'''


       UpperCamelCase						=					['''flax''']



       def __init__(							self      :  Optional[Any]		,    *_UpperCAmelCase      :  Union[str, Any]		,    **_UpperCAmelCase      :  Optional[Any]   )			->						Tuple:


             '''simple docstring'''




             requires_backends(self		,    ["flax"]   )



       @classmethod
       def 					lowercase__    (							cls      :  Optional[int]		,    *_UpperCAmelCase      :  Union[str, Any]		,    **_UpperCAmelCase      :  Dict   )			->						Any:


             '''simple docstring'''




             requires_backends(cls		,    ["flax"]   )







       @classmethod
       def 					lowercase__    (							cls      :  List[str]		,    *_UpperCAmelCase      :  List[str]		,    **_UpperCAmelCase      :  Optional[Any]   )			->						List[str]:


             '''simple docstring'''




             requires_backends(cls		,    ["flax"]   )



class 				lowercase__       (   metaclass=SCREAMING_SNAKE_CASE				):







       '''simple docstring'''


       UpperCamelCase						=					['''flax''']



       def __init__(							self      :  Tuple		,    *_UpperCAmelCase      :  List[str]		,    **_UpperCAmelCase      :  Optional[int]   )			->						Tuple:


             '''simple docstring'''




             requires_backends(self		,    ["flax"]   )



       @classmethod
       def 					lowercase__    (							cls      :  Any		,    *_UpperCAmelCase      :  Tuple		,    **_UpperCAmelCase      :  Optional[int]   )			->						Any:


             '''simple docstring'''




             requires_backends(cls		,    ["flax"]   )







       @classmethod
       def 					lowercase__    (							cls      :  List[Any]		,    *_UpperCAmelCase      :  int		,    **_UpperCAmelCase      :  int   )			->						int:


             '''simple docstring'''




             requires_backends(cls		,    ["flax"]   )



class 				lowercase__       (   metaclass=SCREAMING_SNAKE_CASE				):







       '''simple docstring'''


       UpperCamelCase						=					['''flax''']



       def __init__(							self      :  Tuple		,    *_UpperCAmelCase      :  int		,    **_UpperCAmelCase      :  Any   )			->						List[Any]:


             '''simple docstring'''




             requires_backends(self		,    ["flax"]   )



       @classmethod
       def 					lowercase__    (							cls      :  str		,    *_UpperCAmelCase      :  int		,    **_UpperCAmelCase      :  str   )			->						Any:


             '''simple docstring'''




             requires_backends(cls		,    ["flax"]   )







       @classmethod
       def 					lowercase__    (							cls      :  int		,    *_UpperCAmelCase      :  Dict		,    **_UpperCAmelCase      :  List[Any]   )			->						Dict:


             '''simple docstring'''




             requires_backends(cls		,    ["flax"]   )



class 				lowercase__       (   metaclass=SCREAMING_SNAKE_CASE				):







       '''simple docstring'''


       UpperCamelCase						=					['''flax''']



       def __init__(							self      :  int		,    *_UpperCAmelCase      :  Any		,    **_UpperCAmelCase      :  int   )			->						Union[str, Any]:


             '''simple docstring'''




             requires_backends(self		,    ["flax"]   )



       @classmethod
       def 					lowercase__    (							cls      :  Optional[int]		,    *_UpperCAmelCase      :  Dict		,    **_UpperCAmelCase      :  Dict   )			->						Dict:


             '''simple docstring'''




             requires_backends(cls		,    ["flax"]   )







       @classmethod
       def 					lowercase__    (							cls      :  str		,    *_UpperCAmelCase      :  Dict		,    **_UpperCAmelCase      :  Any   )			->						List[str]:


             '''simple docstring'''




             requires_backends(cls		,    ["flax"]   )




