





"""simple docstring"""





from collections import OrderedDict
from dataclasses import fields
from typing import Any, Tuple

import numpy as np

from .import_utils import is_torch_available




def 		lowerCAmelCase_     (  lowercase_       :							int		):

 '''simple docstring'''






 if is_torch_available():
  import torch

  if isinstance(lowercase_			,				torch.Tensor		):
   return True

 return isinstance(lowercase_			,				np.ndarray		)






class       snake_case		(       __UpperCAmelCase       ):

      def 						SCREAMING_SNAKE_CASE_      (      self       :Dict						):
       __SCREAMING_SNAKE_CASE			:      int 							=	fields(self						)

       # Safety and consistency checks
       if not len(_lowerCamelCase						):
        raise ValueError(f'''{self.__class__.__name__} has no fields.'''						)

       __SCREAMING_SNAKE_CASE			:      Union[str, Any] 							=	getattr(self						,							class_fields[0].name						)
       __SCREAMING_SNAKE_CASE			:      int 							=	all(getattr(self						,							field.name						) is None for field in class_fields[1:]						)

       if other_fields_are_none and isinstance(_lowerCamelCase						,							_lowerCamelCase						):
        for key, value in first_field.items():
         __SCREAMING_SNAKE_CASE			:      List[str] 							=	value
       else:
        for field in class_fields:
         __SCREAMING_SNAKE_CASE			:      Tuple 							=	getattr(self						,							field.name						)
         if v is not None:
          __SCREAMING_SNAKE_CASE			:      Union[str, Any] 							=	v

      def __delitem__(      self       :Any						,							*_lowerCamelCase       :str						,							**_lowerCamelCase       :Optional[int]						):
       raise Exception(f'''You cannot use ``__delitem__`` on a {self.__class__.__name__} instance.'''						)

      def 						SCREAMING_SNAKE_CASE_      (      self       :str						,							*_lowerCamelCase       :List[str]						,							**_lowerCamelCase       :Any						):
       raise Exception(f'''You cannot use ``setdefault`` on a {self.__class__.__name__} instance.'''						)

      def 						SCREAMING_SNAKE_CASE_      (      self       :Dict						,							*_lowerCamelCase       :Optional[int]						,							**_lowerCamelCase       :str						):
       raise Exception(f'''You cannot use ``pop`` on a {self.__class__.__name__} instance.'''						)

      def 						SCREAMING_SNAKE_CASE_      (      self       :Optional[int]						,							*_lowerCamelCase       :str						,							**_lowerCamelCase       :List[Any]						):
       raise Exception(f'''You cannot use ``update`` on a {self.__class__.__name__} instance.'''						)

      def __getitem__(      self       :Dict						,							_lowerCamelCase       :Any						):
       if isinstance(_lowerCamelCase						,							_lowerCamelCase						):
        __SCREAMING_SNAKE_CASE			:      Dict 							=	dict(self.items()						)
        return inner_dict[k]
       else:
        return self.to_tuple()[k]

      def __setattr__(      self       :Union[str, Any]						,							_lowerCamelCase       :int						,							_lowerCamelCase       :Union[str, Any]						):
       if name in self.keys() and value is not None:
        # Don't call self.__setitem__ to avoid recursion errors
        super().__setitem__(_lowerCamelCase						,							_lowerCamelCase						)
       super().__setattr__(_lowerCamelCase						,							_lowerCamelCase						)

      def __setitem__(      self       :Tuple						,							_lowerCamelCase       :Tuple						,							_lowerCamelCase       :int						):
       # Will raise a KeyException if needed
       super().__setitem__(_lowerCamelCase						,							_lowerCamelCase						)
       # Don't call self.__setattr__ to avoid recursion errors
       super().__setattr__(_lowerCamelCase						,							_lowerCamelCase						)



      def 						SCREAMING_SNAKE_CASE_      (      self       :List[Any]						):
       return tuple(self[k] for k in self.keys()						)








"""simple docstring"""





def 		lowerCAmelCase_     (  lowercase_       :							int = 30		):

 '''simple docstring'''






 __SCREAMING_SNAKE_CASE			:      str 							=	exponent + 2
 __SCREAMING_SNAKE_CASE			:      Optional[Any] 							=	(1 + 5**0.5) / 2
 __SCREAMING_SNAKE_CASE			:      Optional[int] 							=	(phi**fibonacci_index - (phi - 1) ** fibonacci_index) / 5**0.5

 return int(lowercase_		)


if __name__ == "__main__":
    print(f'{solution() = }')

