



'''simple docstring'''





import contextlib
import copy
import random
from typing import Any, Dict, Iterable, Optional, Union

import numpy as np
import torch

from .utils import deprecate, is_transformers_available


if is_transformers_available():
  import transformers




def lowerCAmelCase    (__A):



     """simple docstring"""



     random.seed(__A)
     np.random.seed(__A)
     torch.manual_seed(__A)
     torch.cuda.manual_seed_all(__A)
     # ^^ safe to call this function even if cuda is not available






class __A     :



 '''simple docstring'''







 def __init__(self					,  A					,  A = 0.9999					,  A = 0.0					,  A = 0					,  A = False					,  A = 1.0					,  A = 2 / 3					,  A = None					,  A = None					,  **A					,  )       ->	List[str]:


      """simple docstring"""



      if isinstance(A					,  torch.nn.Module			):
           _a           =    (
               '''Passing a `torch.nn.Module` to `ExponentialMovingAverage` is deprecated. '''
               '''Please pass the parameters of the module instead.'''
           )
           deprecate(
               '''passing a `torch.nn.Module` to `ExponentialMovingAverage`'''					,  '''1.0.0'''					,  A					,  standard_warn=A					,  )
           _a           =    parameters.parameters()

           # set use_ema_warmup to True if a torch.nn.Module is passed for backwards compatibility
           _a           =    True

      if kwargs.get('''max_value'''					,  A			) is not None:
           _a           =    '''The `max_value` argument is deprecated. Please use `decay` instead.'''
           deprecate('''max_value'''					,  '''1.0.0'''					,  A					,  standard_warn=A			)
           _a           =    kwargs['''max_value''']

      if kwargs.get('''min_value'''					,  A			) is not None:
           _a           =    '''The `min_value` argument is deprecated. Please use `min_decay` instead.'''
           deprecate('''min_value'''					,  '''1.0.0'''					,  A					,  standard_warn=A			)
           _a           =    kwargs['''min_value''']

      _a           =    list(A			)
      _a           =    [p.clone().detach() for p in parameters]

      if kwargs.get('''device'''					,  A			) is not None:
           _a           =    '''The `device` argument is deprecated. Please use `to` instead.'''
           deprecate('''device'''					,  '''1.0.0'''					,  A					,  standard_warn=A			)
           self.to(device=kwargs['''device''']			)

      _a           =    None

      _a           =    decay
      _a           =    min_decay
      _a           =    update_after_step
      _a           =    use_ema_warmup
      _a           =    inv_gamma
      _a           =    power
      _a           =    0
      _a           =    None  # set in `step()`

      _a           =    model_cls
      _a           =    model_config



 @classmethod
 def    a__    (cls					,  A					,  A			)       ->	"EMAModel":


      """simple docstring"""



      _a    ,       _a           =    model_cls.load_config(A					,  return_unused_kwargs=A			)
      _a           =    model_cls.from_pretrained(A			)

      _a           =    cls(model.parameters()					,  model_cls=A					,  model_config=model.config			)

      ema_model.load_state_dict(A			)
      return ema_model



 def    a__    (self					,  A			)       ->	Tuple:


      """simple docstring"""



      if self.model_cls is None:
           raise ValueError('''`save_pretrained` can only be used if `model_cls` was defined at __init__.'''			)

      if self.model_config is None:
           raise ValueError('''`save_pretrained` can only be used if `model_config` was defined at __init__.'''			)

      _a           =    self.model_cls.from_config(self.model_config			)
      _a           =    self.state_dict()
      state_dict.pop('''shadow_params'''					,  A			)

      model.register_to_config(**A			)
      self.copy_to(model.parameters()			)
      model.save_pretrained(A			)



 def    a__    (self					,  A			)       ->	float:


      """simple docstring"""



      _a           =    max(0					,  optimization_step - self.update_after_step - 1			)

      if step <= 0:
           return 0.0

      if self.use_ema_warmup:
           _a           =    1 - (1 + step / self.inv_gamma) ** -self.power
      else:
           _a           =    (1 + step) / (10 + step)

      _a           =    min(A					,  self.decay			)
      # make sure decay is not smaller than min_decay
      _a           =    max(A					,  self.min_decay			)
      return cur_decay_value



 @torch.no_grad()
 def    a__    (self					,  A			)       ->	Optional[Any]:


      """simple docstring"""



      if isinstance(A					,  torch.nn.Module			):
           _a           =    (
               '''Passing a `torch.nn.Module` to `ExponentialMovingAverage.step` is deprecated. '''
               '''Please pass the parameters of the module instead.'''
           )
           deprecate(
               '''passing a `torch.nn.Module` to `ExponentialMovingAverage.step`'''					,  '''1.0.0'''					,  A					,  standard_warn=A					,  )
           _a           =    parameters.parameters()

      _a           =    list(A			)

      self.optimization_step += 1

      # Compute the decay factor for the exponential moving average.
      _a           =    self.get_decay(self.optimization_step			)
      _a           =    decay
      _a           =    1 - decay

      _a           =    contextlib.nullcontext
      if is_transformers_available() and transformers.deepspeed.is_deepspeed_zeroa_enabled():
           import deepspeed

      for s_param, param in zip(self.shadow_params					,  A			):
           if is_transformers_available() and transformers.deepspeed.is_deepspeed_zeroa_enabled():
                _a           =    deepspeed.zero.GatheredParameters(A					,  modifier_rank=A			)

           with context_manager():
                if param.requires_grad:
                     s_param.sub_(one_minus_decay * (s_param - param)			)
                else:
                     s_param.copy_(A			)



 def    a__    (self					,  A			)       ->	None:


      """simple docstring"""



      _a           =    list(A			)
      for s_param, param in zip(self.shadow_params					,  A			):
           param.data.copy_(s_param.to(param.device			).data			)



 def    a__    (self					,  A=None					,  A=None			)       ->	None:


      """simple docstring"""



      _a           =    [
          p.to(device=A					,  dtype=A			) if p.is_floating_point() else p.to(device=A			)
          for p in self.shadow_params
      ]



 def    a__    (self			)       ->	dict:


      """simple docstring"""



      return {
          "decay": self.decay,
          "min_decay": self.min_decay,
          "optimization_step": self.optimization_step,
          "update_after_step": self.update_after_step,
          "use_ema_warmup": self.use_ema_warmup,
          "inv_gamma": self.inv_gamma,
          "power": self.power,
          "shadow_params": self.shadow_params,
      }



 def    a__    (self					,  A			)       ->	None:


      """simple docstring"""



      _a           =    [param.detach().cpu().clone() for param in parameters]



 def    a__    (self					,  A			)       ->	None:


      """simple docstring"""



      if self.temp_stored_params is None:
           raise RuntimeError('''This ExponentialMovingAverage has no `store()`ed weights ''' '''to `restore()`'''			)
      for c_param, param in zip(self.temp_stored_params					,  A			):
           param.data.copy_(c_param.data			)

      # Better memory-wise.
      _a           =    None



 def    a__    (self					,  A			)       ->	None:


      """simple docstring"""



      _a           =    copy.deepcopy(A			)

      _a           =    state_dict.get('''decay'''					,  self.decay			)
      if self.decay < 0.0 or self.decay > 1.0:
           raise ValueError('''Decay must be between 0 and 1'''			)

      _a           =    state_dict.get('''min_decay'''					,  self.min_decay			)
      if not isinstance(self.min_decay					,  A			):
           raise ValueError('''Invalid min_decay'''			)

      _a           =    state_dict.get('''optimization_step'''					,  self.optimization_step			)
      if not isinstance(self.optimization_step					,  A			):
           raise ValueError('''Invalid optimization_step'''			)

      _a           =    state_dict.get('''update_after_step'''					,  self.update_after_step			)
      if not isinstance(self.update_after_step					,  A			):
           raise ValueError('''Invalid update_after_step'''			)

      _a           =    state_dict.get('''use_ema_warmup'''					,  self.use_ema_warmup			)
      if not isinstance(self.use_ema_warmup					,  A			):
           raise ValueError('''Invalid use_ema_warmup'''			)

      _a           =    state_dict.get('''inv_gamma'''					,  self.inv_gamma			)
      if not isinstance(self.inv_gamma					,  (float, int)			):
           raise ValueError('''Invalid inv_gamma'''			)

      _a           =    state_dict.get('''power'''					,  self.power			)
      if not isinstance(self.power					,  (float, int)			):
           raise ValueError('''Invalid power'''			)

      _a           =    state_dict.get('''shadow_params'''					,  A			)
      if shadow_params is not None:
           _a           =    shadow_params
           if not isinstance(self.shadow_params					,  A			):
                raise ValueError('''shadow_params must be a list'''			)
           if not all(isinstance(A					,  torch.Tensor			) for p in self.shadow_params			):
                raise ValueError('''shadow_params must all be Tensors'''			)










'''simple docstring'''


from ..utils import DummyObject, requires_backends

class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				int								=       ["torch"]




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




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Optional[Any]:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Union[str, Any]:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				int								=       ["torch"]




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




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Optional[Any]:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Any:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				List[Any]								=       ["torch"]




 def __init__(						self      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Any:
     requires_backends(self      ,  ["torch"]		)




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				List[Any]:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Optional[Any]:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				List[Any]								=       ["torch"]




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




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				List[Any]:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				List[str]:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				Dict								=       ["torch"]




 def __init__(						self      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				int:
     requires_backends(self      ,  ["torch"]		)




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Optional[Any]:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				List[str]:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				List[Any]								=       ["torch"]




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




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				str:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				List[str]:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				int								=       ["torch"]




 def __init__(						self      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Any:
     requires_backends(self      ,  ["torch"]		)




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				str:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				List[Any]:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				Optional[int]								=       ["torch"]




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




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Tuple:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				List[Any]:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				Union[str, Any]								=       ["torch"]




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




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				int:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				List[str]:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				Optional[int]								=       ["torch"]




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




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Optional[int]:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Optional[int]:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				Union[str, Any]								=       ["torch"]




 def __init__(						self      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				str:
     requires_backends(self      ,  ["torch"]		)




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Union[str, Any]:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				int:
     requires_backends(cls      ,  ["torch"]		)







def 						__a(*SCREAMING_SNAKE_CASE_	:       Optional[Any]		,							**SCREAMING_SNAKE_CASE_	:       int     ):



    '''simple docstring'''





    requires_backends(SCREAMING_SNAKE_CASE_		,							["torch"]     )


def 						__a(*SCREAMING_SNAKE_CASE_	:       str		,							**SCREAMING_SNAKE_CASE_	:       str     ):



    '''simple docstring'''





    requires_backends(SCREAMING_SNAKE_CASE_		,							["torch"]     )


def 						__a(*SCREAMING_SNAKE_CASE_	:       str		,							**SCREAMING_SNAKE_CASE_	:       List[Any]     ):



    '''simple docstring'''





    requires_backends(SCREAMING_SNAKE_CASE_		,							["torch"]     )


def 						__a(*SCREAMING_SNAKE_CASE_	:       Optional[Any]		,							**SCREAMING_SNAKE_CASE_	:       List[str]     ):



    '''simple docstring'''





    requires_backends(SCREAMING_SNAKE_CASE_		,							["torch"]     )


def 						__a(*SCREAMING_SNAKE_CASE_	:       List[Any]		,							**SCREAMING_SNAKE_CASE_	:       List[str]     ):



    '''simple docstring'''





    requires_backends(SCREAMING_SNAKE_CASE_		,							["torch"]     )


def 						__a(*SCREAMING_SNAKE_CASE_	:       Tuple		,							**SCREAMING_SNAKE_CASE_	:       str     ):



    '''simple docstring'''





    requires_backends(SCREAMING_SNAKE_CASE_		,							["torch"]     )


def 						__a(*SCREAMING_SNAKE_CASE_	:       int		,							**SCREAMING_SNAKE_CASE_	:       Dict     ):



    '''simple docstring'''





    requires_backends(SCREAMING_SNAKE_CASE_		,							["torch"]     )

class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				Dict								=       ["torch"]




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




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Dict:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Dict:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				Union[str, Any]								=       ["torch"]




 def __init__(						self      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				str:
     requires_backends(self      ,  ["torch"]		)




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Tuple:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				List[Any]:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				Optional[Any]								=       ["torch"]




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




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Tuple:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				List[Any]:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				List[Any]								=       ["torch"]




 def __init__(						self      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Tuple:
     requires_backends(self      ,  ["torch"]		)




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Union[str, Any]:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				int:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				List[Any]								=       ["torch"]




 def __init__(						self      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				int:
     requires_backends(self      ,  ["torch"]		)




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Optional[int]:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Optional[Any]:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				Any								=       ["torch"]




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




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Optional[int]:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Optional[int]:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				Optional[int]								=       ["torch"]




 def __init__(						self      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Dict:
     requires_backends(self      ,  ["torch"]		)




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				List[str]:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Tuple:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				List[str]								=       ["torch"]




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




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				List[str]:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Any:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				Any								=       ["torch"]




 def __init__(						self      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				int:
     requires_backends(self      ,  ["torch"]		)




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				int:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Dict:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				List[str]								=       ["torch"]




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




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Optional[int]:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Any:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				List[str]								=       ["torch"]




 def __init__(						self      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				int:
     requires_backends(self      ,  ["torch"]		)




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Optional[Any]:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Optional[Any]:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				Optional[int]								=       ["torch"]




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




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				str:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Dict:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				Union[str, Any]								=       ["torch"]




 def __init__(						self      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Any:
     requires_backends(self      ,  ["torch"]		)




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				str:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Dict:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				List[Any]								=       ["torch"]




 def __init__(						self      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Any:
     requires_backends(self      ,  ["torch"]		)




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Tuple:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Union[str, Any]:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				Optional[int]								=       ["torch"]




 def __init__(						self      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				int:
     requires_backends(self      ,  ["torch"]		)




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				int:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				List[str]:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				str								=       ["torch"]




 def __init__(						self      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				int:
     requires_backends(self      ,  ["torch"]		)




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Optional[int]:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				List[Any]:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				Tuple								=       ["torch"]




 def __init__(						self      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				str:
     requires_backends(self      ,  ["torch"]		)




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Optional[Any]:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				List[str]:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				Union[str, Any]								=       ["torch"]




 def __init__(						self      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				str:
     requires_backends(self      ,  ["torch"]		)




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Union[str, Any]:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Tuple:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				List[str]								=       ["torch"]




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




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Optional[int]:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				str:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				Any								=       ["torch"]




 def __init__(						self      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				str:
     requires_backends(self      ,  ["torch"]		)




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				List[str]:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				int:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				Union[str, Any]								=       ["torch"]




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




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Any:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Dict:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				Union[str, Any]								=       ["torch"]




 def __init__(						self      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				int:
     requires_backends(self      ,  ["torch"]		)




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Any:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				str:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				int								=       ["torch"]




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




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Optional[Any]:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Tuple:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				Tuple								=       ["torch"]




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




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Dict:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				int:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				str								=       ["torch"]




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




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Optional[int]:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Optional[int]:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				Dict								=       ["torch"]




 def __init__(						self      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				str:
     requires_backends(self      ,  ["torch"]		)




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Any:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Tuple:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				Any								=       ["torch"]




 def __init__(						self      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				int:
     requires_backends(self      ,  ["torch"]		)




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Tuple:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Optional[Any]:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				List[str]								=       ["torch"]




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




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Optional[Any]:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Optional[Any]:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				int								=       ["torch"]




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




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Union[str, Any]:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Dict:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				Dict								=       ["torch"]




 def __init__(						self      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Any:
     requires_backends(self      ,  ["torch"]		)




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				List[Any]:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Dict:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				str								=       ["torch"]




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




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Tuple:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				List[Any]:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				int								=       ["torch"]




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




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				List[str]:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				List[Any]:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				List[Any]								=       ["torch"]




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




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				List[Any]:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Dict:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				List[Any]								=       ["torch"]




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




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				str:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Union[str, Any]:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				List[str]								=       ["torch"]




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




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Optional[Any]:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Union[str, Any]:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				Tuple								=       ["torch"]




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




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Dict:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Tuple:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				Union[str, Any]								=       ["torch"]




 def __init__(						self      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				str:
     requires_backends(self      ,  ["torch"]		)




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Any:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Union[str, Any]:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				str								=       ["torch"]




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




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Tuple:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				str:
     requires_backends(cls      ,  ["torch"]		)







class  lowerCAmelCase_		(		metaclass=__magic_name__		):
 __lowerCamelCase    :				Union[str, Any]								=       ["torch"]




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




 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				str:
     requires_backends(cls      ,  ["torch"]		)





 @classmethod
 def 				_snake_case (						cls      ,  *_lowerCAmelCase      ,  **_lowerCAmelCase		)     ->				Dict:
     requires_backends(cls      ,  ["torch"]		)


