


import tempfile

import torch

from diffusers import (
    DEISMultistepScheduler,
    DPMSolverMultistepScheduler,
    DPMSolverSinglestepScheduler,
    UniPCMultistepScheduler,
)

from .test_schedulers import SchedulerCommonTest
class  SCREAMING_SNAKE_CASE__  (				lowercase__			):
      snake_case__				:     Dict        =						(DEISMultistepScheduler,)
      snake_case__				:     str        =						(('''num_inference_steps''', 25),)
      def        SCREAMING_SNAKE_CASE							(       self				:       str     ,							**SCREAMING_SNAKE_CASE__				:       Any     )		->			Optional[Any]:
             a_					:		Optional[Any]							=  {
                 'num_train_timesteps': 1_0_0_0,
                 'beta_start': 0.0001,
                 'beta_end': 0.02,
                 'beta_schedule': 'linear',
                 'solver_order': 2,
             }

             config.update(**SCREAMING_SNAKE_CASE__     )
             return config
      def        SCREAMING_SNAKE_CASE							(       self				:       Union[str, Any]     ,							SCREAMING_SNAKE_CASE__				:       Optional[Any]=0     ,							**SCREAMING_SNAKE_CASE__				:       Optional[Any]     )		->			Tuple:
             a_					:		Optional[Any]							=  dict(self.forward_default_kwargs     )
             a_					:		Dict							=  kwargs.pop('num_inference_steps'     ,							SCREAMING_SNAKE_CASE__     )
             a_					:		Tuple							=  self.dummy_sample
             a_					:		str							=  0.1 * sample
             a_					:		Tuple							=  [residual + 0.2, residual + 0.15, residual + 0.10]

             for scheduler_class in self.scheduler_classes:
                    a_					:		Union[str, Any]							=  self.get_scheduler_config(**SCREAMING_SNAKE_CASE__     )
                    a_					:		Any							=  scheduler_class(**SCREAMING_SNAKE_CASE__     )
                    scheduler.set_timesteps(SCREAMING_SNAKE_CASE__     )
                    # copy over dummy past residuals
                    a_					:		List[str]							=  dummy_past_residuals[: scheduler.config.solver_order]

                    with tempfile.TemporaryDirectory() as tmpdirname:
                           scheduler.save_config(SCREAMING_SNAKE_CASE__     )
                           a_					:		Optional[Any]							=  scheduler_class.from_pretrained(SCREAMING_SNAKE_CASE__     )
                           new_scheduler.set_timesteps(SCREAMING_SNAKE_CASE__     )
                           # copy over dummy past residuals
                           a_					:		Dict							=  dummy_past_residuals[: new_scheduler.config.solver_order]

                    a_							,		a_					:		Union[str, Any]							=  sample, sample
                    for t in range(SCREAMING_SNAKE_CASE__     ,							time_step + scheduler.config.solver_order + 1     ):
                           a_					:		Tuple							=  scheduler.step(SCREAMING_SNAKE_CASE__     ,							SCREAMING_SNAKE_CASE__     ,							SCREAMING_SNAKE_CASE__     ,							**SCREAMING_SNAKE_CASE__     ).prev_sample
                           a_					:		Tuple							=  new_scheduler.step(SCREAMING_SNAKE_CASE__     ,							SCREAMING_SNAKE_CASE__     ,							SCREAMING_SNAKE_CASE__     ,							**SCREAMING_SNAKE_CASE__     ).prev_sample

                           assert torch.sum(torch.abs(output - new_output     )     ) < 1E-5, "Scheduler outputs are not identical"
      def        SCREAMING_SNAKE_CASE							(       self				:       Any     )		->			str:
             pass
      def        SCREAMING_SNAKE_CASE							(       self				:       List[str]     ,							SCREAMING_SNAKE_CASE__				:       Optional[int]=0     ,							**SCREAMING_SNAKE_CASE__				:       List[Any]     )		->			List[Any]:
             a_					:		int							=  dict(self.forward_default_kwargs     )
             a_					:		Tuple							=  kwargs.pop('num_inference_steps'     ,							SCREAMING_SNAKE_CASE__     )
             a_					:		int							=  self.dummy_sample
             a_					:		Any							=  0.1 * sample
             a_					:		Union[str, Any]							=  [residual + 0.2, residual + 0.15, residual + 0.10]

             for scheduler_class in self.scheduler_classes:
                    a_					:		Tuple							=  self.get_scheduler_config()
                    a_					:		Optional[int]							=  scheduler_class(**SCREAMING_SNAKE_CASE__     )
                    scheduler.set_timesteps(SCREAMING_SNAKE_CASE__     )

                    # copy over dummy past residuals (must be after setting timesteps)
                    a_					:		Tuple							=  dummy_past_residuals[: scheduler.config.solver_order]

                    with tempfile.TemporaryDirectory() as tmpdirname:
                           scheduler.save_config(SCREAMING_SNAKE_CASE__     )
                           a_					:		Tuple							=  scheduler_class.from_pretrained(SCREAMING_SNAKE_CASE__     )
                           # copy over dummy past residuals
                           new_scheduler.set_timesteps(SCREAMING_SNAKE_CASE__     )

                           # copy over dummy past residual (must be after setting timesteps)
                           a_					:		int							=  dummy_past_residuals[: new_scheduler.config.solver_order]

                    a_					:		Any							=  scheduler.step(SCREAMING_SNAKE_CASE__     ,							SCREAMING_SNAKE_CASE__     ,							SCREAMING_SNAKE_CASE__     ,							**SCREAMING_SNAKE_CASE__     ).prev_sample
                    a_					:		Tuple							=  new_scheduler.step(SCREAMING_SNAKE_CASE__     ,							SCREAMING_SNAKE_CASE__     ,							SCREAMING_SNAKE_CASE__     ,							**SCREAMING_SNAKE_CASE__     ).prev_sample

                    assert torch.sum(torch.abs(output - new_output     )     ) < 1E-5, "Scheduler outputs are not identical"
      def        SCREAMING_SNAKE_CASE							(       self				:       Any     ,							SCREAMING_SNAKE_CASE__				:       Optional[int]=None     ,							**SCREAMING_SNAKE_CASE__				:       Tuple     )		->			Union[str, Any]:
             if scheduler is None:
                    a_					:		Dict							=  self.scheduler_classes[0]
                    a_					:		Union[str, Any]							=  self.get_scheduler_config(**SCREAMING_SNAKE_CASE__     )
                    a_					:		Tuple							=  scheduler_class(**SCREAMING_SNAKE_CASE__     )

             a_					:		int							=  self.scheduler_classes[0]
             a_					:		str							=  self.get_scheduler_config(**SCREAMING_SNAKE_CASE__     )
             a_					:		str							=  scheduler_class(**SCREAMING_SNAKE_CASE__     )

             a_					:		List[Any]							=  1_0
             a_					:		str							=  self.dummy_model()
             a_					:		Optional[Any]							=  self.dummy_sample_deter
             scheduler.set_timesteps(SCREAMING_SNAKE_CASE__     )

             for i, t in enumerate(scheduler.timesteps     ):
                    a_					:		Union[str, Any]							=  model(SCREAMING_SNAKE_CASE__     ,							SCREAMING_SNAKE_CASE__     )
                    a_					:		Optional[Any]							=  scheduler.step(SCREAMING_SNAKE_CASE__     ,							SCREAMING_SNAKE_CASE__     ,							SCREAMING_SNAKE_CASE__     ).prev_sample

             return sample
      def        SCREAMING_SNAKE_CASE							(       self				:       int     )		->			Union[str, Any]:
             a_					:		int							=  dict(self.forward_default_kwargs     )

             a_					:		str							=  kwargs.pop('num_inference_steps'     ,							SCREAMING_SNAKE_CASE__     )

             for scheduler_class in self.scheduler_classes:
                    a_					:		Union[str, Any]							=  self.get_scheduler_config()
                    a_					:		Optional[int]							=  scheduler_class(**SCREAMING_SNAKE_CASE__     )

                    a_					:		Any							=  self.dummy_sample
                    a_					:		List[Any]							=  0.1 * sample

                    if num_inference_steps is not None and hasattr(SCREAMING_SNAKE_CASE__     ,							'set_timesteps'     ):
                           scheduler.set_timesteps(SCREAMING_SNAKE_CASE__     )
                    elif num_inference_steps is not None and not hasattr(SCREAMING_SNAKE_CASE__     ,							'set_timesteps'     ):
                           a_					:		Optional[Any]							=  num_inference_steps

                    # copy over dummy past residuals (must be done after set_timesteps)
                    a_					:		Union[str, Any]							=  [residual + 0.2, residual + 0.15, residual + 0.10]
                    a_					:		str							=  dummy_past_residuals[: scheduler.config.solver_order]

                    a_					:		Any							=  scheduler.timesteps[5]
                    a_					:		Dict							=  scheduler.timesteps[6]

                    a_					:		int							=  scheduler.step(SCREAMING_SNAKE_CASE__     ,							SCREAMING_SNAKE_CASE__     ,							SCREAMING_SNAKE_CASE__     ,							**SCREAMING_SNAKE_CASE__     ).prev_sample
                    a_					:		int							=  scheduler.step(SCREAMING_SNAKE_CASE__     ,							SCREAMING_SNAKE_CASE__     ,							SCREAMING_SNAKE_CASE__     ,							**SCREAMING_SNAKE_CASE__     ).prev_sample

                    self.assertEqual(output_a.shape     ,							sample.shape     )
                    self.assertEqual(output_a.shape     ,							output_a.shape     )
      def        SCREAMING_SNAKE_CASE							(       self				:       int     )		->			str:
             # make sure that iterating over schedulers with same config names gives same results
             # for defaults
             a_					:		int							=  DEISMultistepScheduler(**self.get_scheduler_config()     )
             a_					:		List[Any]							=  self.full_loop(scheduler=SCREAMING_SNAKE_CASE__     )
             a_					:		Any							=  torch.mean(torch.abs(SCREAMING_SNAKE_CASE__     )     )

             assert abs(result_mean.item() - 0.23916     ) < 1E-3

             a_					:		List[Any]							=  DPMSolverSinglestepScheduler.from_config(scheduler.config     )
             a_					:		Union[str, Any]							=  DPMSolverMultistepScheduler.from_config(scheduler.config     )
             a_					:		Optional[Any]							=  UniPCMultistepScheduler.from_config(scheduler.config     )
             a_					:		Optional[Any]							=  DEISMultistepScheduler.from_config(scheduler.config     )

             a_					:		Dict							=  self.full_loop(scheduler=SCREAMING_SNAKE_CASE__     )
             a_					:		Optional[int]							=  torch.mean(torch.abs(SCREAMING_SNAKE_CASE__     )     )

             assert abs(result_mean.item() - 0.23916     ) < 1E-3
      def        SCREAMING_SNAKE_CASE							(       self				:       Tuple     )		->			List[str]:
             for timesteps in [2_5, 5_0, 1_0_0, 9_9_9, 1_0_0_0]:
                    self.check_over_configs(num_train_timesteps=SCREAMING_SNAKE_CASE__     )
      def        SCREAMING_SNAKE_CASE							(       self				:       str     )		->			int:
             self.check_over_configs(thresholding=SCREAMING_SNAKE_CASE__     )
             for order in [1, 2, 3]:
                    for solver_type in ["logrho"]:
                           for threshold in [0.5, 1.0, 2.0]:
                                  for prediction_type in ["epsilon", "sample"]:
                                         self.check_over_configs(
                                             thresholding=SCREAMING_SNAKE_CASE__     ,							prediction_type=SCREAMING_SNAKE_CASE__     ,							sample_max_value=SCREAMING_SNAKE_CASE__     ,							algorithm_type='deis'     ,							solver_order=SCREAMING_SNAKE_CASE__     ,							solver_type=SCREAMING_SNAKE_CASE__     ,							)
      def        SCREAMING_SNAKE_CASE							(       self				:       Union[str, Any]     )		->			Union[str, Any]:
             for prediction_type in ["epsilon", "v_prediction"]:
                    self.check_over_configs(prediction_type=SCREAMING_SNAKE_CASE__     )
      def        SCREAMING_SNAKE_CASE							(       self				:       str     )		->			Dict:
             for algorithm_type in ["deis"]:
                    for solver_type in ["logrho"]:
                           for order in [1, 2, 3]:
                                  for prediction_type in ["epsilon", "sample"]:
                                         self.check_over_configs(
                                             solver_order=SCREAMING_SNAKE_CASE__     ,							solver_type=SCREAMING_SNAKE_CASE__     ,							prediction_type=SCREAMING_SNAKE_CASE__     ,							algorithm_type=SCREAMING_SNAKE_CASE__     ,							)
                                         a_					:		Optional[Any]							=  self.full_loop(
                                             solver_order=SCREAMING_SNAKE_CASE__     ,							solver_type=SCREAMING_SNAKE_CASE__     ,							prediction_type=SCREAMING_SNAKE_CASE__     ,							algorithm_type=SCREAMING_SNAKE_CASE__     ,							)
                                         assert not torch.isnan(SCREAMING_SNAKE_CASE__     ).any(), "Samples have nan numbers"
      def        SCREAMING_SNAKE_CASE							(       self				:       Union[str, Any]     )		->			Union[str, Any]:
             self.check_over_configs(lower_order_final=SCREAMING_SNAKE_CASE__     )
             self.check_over_configs(lower_order_final=SCREAMING_SNAKE_CASE__     )
      def        SCREAMING_SNAKE_CASE							(       self				:       Optional[Any]     )		->			Optional[Any]:
             for num_inference_steps in [1, 2, 3, 5, 1_0, 5_0, 1_0_0, 9_9_9, 1_0_0_0]:
                    self.check_over_forward(num_inference_steps=SCREAMING_SNAKE_CASE__     ,							time_step=0     )
      def        SCREAMING_SNAKE_CASE							(       self				:       Union[str, Any]     )		->			str:
             a_					:		List[str]							=  self.full_loop()
             a_					:		List[Any]							=  torch.mean(torch.abs(SCREAMING_SNAKE_CASE__     )     )

             assert abs(result_mean.item() - 0.23916     ) < 1E-3
      def        SCREAMING_SNAKE_CASE							(       self				:       int     )		->			str:
             a_					:		Dict							=  self.full_loop(prediction_type='v_prediction'     )
             a_					:		Union[str, Any]							=  torch.mean(torch.abs(SCREAMING_SNAKE_CASE__     )     )

             assert abs(result_mean.item() - 0.091     ) < 1E-3

      def        SCREAMING_SNAKE_CASE							(       self				:       Optional[Any]     )		->			int:
             a_					:		int							=  self.scheduler_classes[0]
             a_					:		Union[str, Any]							=  self.get_scheduler_config(thresholding=SCREAMING_SNAKE_CASE__     ,							dynamic_thresholding_ratio=0     )
             a_					:		List[str]							=  scheduler_class(**SCREAMING_SNAKE_CASE__     )

             a_					:		Union[str, Any]							=  1_0
             a_					:		List[str]							=  self.dummy_model()
             a_					:		Optional[int]							=  self.dummy_sample_deter.half()
             scheduler.set_timesteps(SCREAMING_SNAKE_CASE__     )

             for i, t in enumerate(scheduler.timesteps     ):
                    a_					:		Any							=  model(SCREAMING_SNAKE_CASE__     ,							SCREAMING_SNAKE_CASE__     )
                    a_					:		List[Any]							=  scheduler.step(SCREAMING_SNAKE_CASE__     ,							SCREAMING_SNAKE_CASE__     ,							SCREAMING_SNAKE_CASE__     ).prev_sample

             assert sample.dtype == torch.floataa







"""simple docstring"""







from ..utils import DummyObject, requires_backends







class       UpperCamelCase__   (	metaclass=lowercase_  ):




      """simple docstring"""




      _SCREAMING_SNAKE_CASE  				=     ["""flax"""]



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



      @classmethod
      def      SCREAMING_SNAKE_CASE__ (      cls				:      Any    ,			*SCREAMING_SNAKE_CASE_				:      int    ,			**SCREAMING_SNAKE_CASE_				:      List[str]       ):
        requires_backends(cls    ,			['flax']       )





      @classmethod
      def      SCREAMING_SNAKE_CASE__ (      cls				:      int    ,			*SCREAMING_SNAKE_CASE_				:      Optional[int]    ,			**SCREAMING_SNAKE_CASE_				:      Optional[int]       ):
        requires_backends(cls    ,			['flax']       )







class       UpperCamelCase__   (	metaclass=lowercase_  ):




      """simple docstring"""




      _SCREAMING_SNAKE_CASE  				=     ["""flax"""]



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



      @classmethod
      def      SCREAMING_SNAKE_CASE__ (      cls				:      Union[str, Any]    ,			*SCREAMING_SNAKE_CASE_				:      Dict    ,			**SCREAMING_SNAKE_CASE_				:      Dict       ):
        requires_backends(cls    ,			['flax']       )





      @classmethod
      def      SCREAMING_SNAKE_CASE__ (      cls				:      Dict    ,			*SCREAMING_SNAKE_CASE_				:      List[str]    ,			**SCREAMING_SNAKE_CASE_				:      Optional[Any]       ):
        requires_backends(cls    ,			['flax']       )







class       UpperCamelCase__   (	metaclass=lowercase_  ):




      """simple docstring"""




      _SCREAMING_SNAKE_CASE  				=     ["""flax"""]



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



      @classmethod
      def      SCREAMING_SNAKE_CASE__ (      cls				:      List[Any]    ,			*SCREAMING_SNAKE_CASE_				:      Any    ,			**SCREAMING_SNAKE_CASE_				:      List[Any]       ):
        requires_backends(cls    ,			['flax']       )





      @classmethod
      def      SCREAMING_SNAKE_CASE__ (      cls				:      Union[str, Any]    ,			*SCREAMING_SNAKE_CASE_				:      List[str]    ,			**SCREAMING_SNAKE_CASE_				:      List[str]       ):
        requires_backends(cls    ,			['flax']       )







class       UpperCamelCase__   (	metaclass=lowercase_  ):




      """simple docstring"""




      _SCREAMING_SNAKE_CASE  				=     ["""flax"""]



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



      @classmethod
      def      SCREAMING_SNAKE_CASE__ (      cls				:      Tuple    ,			*SCREAMING_SNAKE_CASE_				:      List[str]    ,			**SCREAMING_SNAKE_CASE_				:      str       ):
        requires_backends(cls    ,			['flax']       )





      @classmethod
      def      SCREAMING_SNAKE_CASE__ (      cls				:      List[Any]    ,			*SCREAMING_SNAKE_CASE_				:      Dict    ,			**SCREAMING_SNAKE_CASE_				:      int       ):
        requires_backends(cls    ,			['flax']       )







class       UpperCamelCase__   (	metaclass=lowercase_  ):




      """simple docstring"""




      _SCREAMING_SNAKE_CASE  				=     ["""flax"""]



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



      @classmethod
      def      SCREAMING_SNAKE_CASE__ (      cls				:      Optional[Any]    ,			*SCREAMING_SNAKE_CASE_				:      str    ,			**SCREAMING_SNAKE_CASE_				:      List[str]       ):
        requires_backends(cls    ,			['flax']       )





      @classmethod
      def      SCREAMING_SNAKE_CASE__ (      cls				:      List[str]    ,			*SCREAMING_SNAKE_CASE_				:      Optional[int]    ,			**SCREAMING_SNAKE_CASE_				:      Dict       ):
        requires_backends(cls    ,			['flax']       )







class       UpperCamelCase__   (	metaclass=lowercase_  ):




      """simple docstring"""




      _SCREAMING_SNAKE_CASE  				=     ["""flax"""]



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



      @classmethod
      def      SCREAMING_SNAKE_CASE__ (      cls				:      str    ,			*SCREAMING_SNAKE_CASE_				:      Optional[Any]    ,			**SCREAMING_SNAKE_CASE_				:      Any       ):
        requires_backends(cls    ,			['flax']       )





      @classmethod
      def      SCREAMING_SNAKE_CASE__ (      cls				:      Tuple    ,			*SCREAMING_SNAKE_CASE_				:      List[Any]    ,			**SCREAMING_SNAKE_CASE_				:      Union[str, Any]       ):
        requires_backends(cls    ,			['flax']       )







class       UpperCamelCase__   (	metaclass=lowercase_  ):




      """simple docstring"""




      _SCREAMING_SNAKE_CASE  				=     ["""flax"""]



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



      @classmethod
      def      SCREAMING_SNAKE_CASE__ (      cls				:      Optional[int]    ,			*SCREAMING_SNAKE_CASE_				:      int    ,			**SCREAMING_SNAKE_CASE_				:      Dict       ):
        requires_backends(cls    ,			['flax']       )





      @classmethod
      def      SCREAMING_SNAKE_CASE__ (      cls				:      Optional[int]    ,			*SCREAMING_SNAKE_CASE_				:      Tuple    ,			**SCREAMING_SNAKE_CASE_				:      Union[str, Any]       ):
        requires_backends(cls    ,			['flax']       )







class       UpperCamelCase__   (	metaclass=lowercase_  ):




      """simple docstring"""




      _SCREAMING_SNAKE_CASE  				=     ["""flax"""]



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



      @classmethod
      def      SCREAMING_SNAKE_CASE__ (      cls				:      Union[str, Any]    ,			*SCREAMING_SNAKE_CASE_				:      List[str]    ,			**SCREAMING_SNAKE_CASE_				:      Tuple       ):
        requires_backends(cls    ,			['flax']       )





      @classmethod
      def      SCREAMING_SNAKE_CASE__ (      cls				:      Dict    ,			*SCREAMING_SNAKE_CASE_				:      List[Any]    ,			**SCREAMING_SNAKE_CASE_				:      Tuple       ):
        requires_backends(cls    ,			['flax']       )







class       UpperCamelCase__   (	metaclass=lowercase_  ):




      """simple docstring"""




      _SCREAMING_SNAKE_CASE  				=     ["""flax"""]



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



      @classmethod
      def      SCREAMING_SNAKE_CASE__ (      cls				:      Any    ,			*SCREAMING_SNAKE_CASE_				:      Optional[int]    ,			**SCREAMING_SNAKE_CASE_				:      str       ):
        requires_backends(cls    ,			['flax']       )





      @classmethod
      def      SCREAMING_SNAKE_CASE__ (      cls				:      Dict    ,			*SCREAMING_SNAKE_CASE_				:      List[Any]    ,			**SCREAMING_SNAKE_CASE_				:      Tuple       ):
        requires_backends(cls    ,			['flax']       )







class       UpperCamelCase__   (	metaclass=lowercase_  ):




      """simple docstring"""




      _SCREAMING_SNAKE_CASE  				=     ["""flax"""]



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



      @classmethod
      def      SCREAMING_SNAKE_CASE__ (      cls				:      Optional[int]    ,			*SCREAMING_SNAKE_CASE_				:      Tuple    ,			**SCREAMING_SNAKE_CASE_				:      List[Any]       ):
        requires_backends(cls    ,			['flax']       )





      @classmethod
      def      SCREAMING_SNAKE_CASE__ (      cls				:      Dict    ,			*SCREAMING_SNAKE_CASE_				:      Optional[Any]    ,			**SCREAMING_SNAKE_CASE_				:      int       ):
        requires_backends(cls    ,			['flax']       )







class       UpperCamelCase__   (	metaclass=lowercase_  ):




      """simple docstring"""




      _SCREAMING_SNAKE_CASE  				=     ["""flax"""]



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



      @classmethod
      def      SCREAMING_SNAKE_CASE__ (      cls				:      Optional[Any]    ,			*SCREAMING_SNAKE_CASE_				:      Union[str, Any]    ,			**SCREAMING_SNAKE_CASE_				:      Optional[Any]       ):
        requires_backends(cls    ,			['flax']       )





      @classmethod
      def      SCREAMING_SNAKE_CASE__ (      cls				:      Union[str, Any]    ,			*SCREAMING_SNAKE_CASE_				:      Optional[Any]    ,			**SCREAMING_SNAKE_CASE_				:      int       ):
        requires_backends(cls    ,			['flax']       )







class       UpperCamelCase__   (	metaclass=lowercase_  ):




      """simple docstring"""




      _SCREAMING_SNAKE_CASE  				=     ["""flax"""]



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



      @classmethod
      def      SCREAMING_SNAKE_CASE__ (      cls				:      Union[str, Any]    ,			*SCREAMING_SNAKE_CASE_				:      Tuple    ,			**SCREAMING_SNAKE_CASE_				:      List[str]       ):
        requires_backends(cls    ,			['flax']       )





      @classmethod
      def      SCREAMING_SNAKE_CASE__ (      cls				:      Tuple    ,			*SCREAMING_SNAKE_CASE_				:      Optional[Any]    ,			**SCREAMING_SNAKE_CASE_				:      str       ):
        requires_backends(cls    ,			['flax']       )







class       UpperCamelCase__   (	metaclass=lowercase_  ):




      """simple docstring"""




      _SCREAMING_SNAKE_CASE  				=     ["""flax"""]



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



      @classmethod
      def      SCREAMING_SNAKE_CASE__ (      cls				:      Tuple    ,			*SCREAMING_SNAKE_CASE_				:      Dict    ,			**SCREAMING_SNAKE_CASE_				:      Optional[int]       ):
        requires_backends(cls    ,			['flax']       )





      @classmethod
      def      SCREAMING_SNAKE_CASE__ (      cls				:      Optional[int]    ,			*SCREAMING_SNAKE_CASE_				:      str    ,			**SCREAMING_SNAKE_CASE_				:      Tuple       ):
        requires_backends(cls    ,			['flax']       )





