code: 
  
  
  
  
  
  
  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 			lowercase__  (				A_:	int		)  ->							Union[str, Any]:
  
  
  
  
  
  
  
         """simple docstring"""
  
  
  
  
  
  
         if is_torch_available():
                import torch
  
                if isinstance(A_     ,			torch.Tensor		):
                       return True
  
         return isinstance(A_     ,			np.ndarray		)
  
  
  
  
  
  class 							_A (    UpperCamelCase							):
      """simple docstring"""
  
      def _a       (							self			:    Tuple			)			->       Any:
             __UpperCAmelCase    							=fields(self			)
  
             # Safety and consistency checks
             if not len(__SCREAMING_SNAKE_CASE			):
                    raise ValueError(f'''{self.__class__.__name__} has no fields.'''			)
  
             __UpperCAmelCase    							=getattr(self   ,    class_fields[0].name			)
             __UpperCAmelCase    							=all(getattr(self   ,    field.name			) is None for field in class_fields[1:]			)
  
             if other_fields_are_none and isinstance(__SCREAMING_SNAKE_CASE   ,    __SCREAMING_SNAKE_CASE			):
                    for key, value in first_field.items():
                           __UpperCAmelCase    							=value
             else:
                    for field in class_fields:
                           __UpperCAmelCase    							=getattr(self   ,    field.name			)
                           if v is not None:
                                  __UpperCAmelCase    							=v
  
  
  
      def __delitem__(							self			:    List[Any]   ,    *__SCREAMING_SNAKE_CASE			:    List[Any]   ,    **__SCREAMING_SNAKE_CASE			:    str			)			->       Tuple:
             raise Exception(f'''You cannot use ``__delitem__`` on a {self.__class__.__name__} instance.'''			)
  
  
  
      def _a       (							self			:    Union[str, Any]   ,    *__SCREAMING_SNAKE_CASE			:    Optional[Any]   ,    **__SCREAMING_SNAKE_CASE			:    Tuple			)			->       Any:
             raise Exception(f'''You cannot use ``setdefault`` on a {self.__class__.__name__} instance.'''			)
  
  
  
      def _a       (							self			:    Optional[Any]   ,    *__SCREAMING_SNAKE_CASE			:    Any   ,    **__SCREAMING_SNAKE_CASE			:    List[str]			)			->       Optional[int]:
             raise Exception(f'''You cannot use ``pop`` on a {self.__class__.__name__} instance.'''			)
  
  
  
      def _a       (							self			:    Dict   ,    *__SCREAMING_SNAKE_CASE			:    Any   ,    **__SCREAMING_SNAKE_CASE			:    Optional[int]			)			->       int:
             raise Exception(f'''You cannot use ``update`` on a {self.__class__.__name__} instance.'''			)
  
  
  
      def __getitem__(							self			:    List[Any]   ,    __SCREAMING_SNAKE_CASE			:    int			)			->       Optional[int]:
             if isinstance(__SCREAMING_SNAKE_CASE   ,    __SCREAMING_SNAKE_CASE			):
                    __UpperCAmelCase    							=dict(self.items()			)
                    return inner_dict[k]
             else:
                    return self.to_tuple()[k]
  
  
  
      def __setattr__(							self			:    Tuple   ,    __SCREAMING_SNAKE_CASE			:    Optional[Any]   ,    __SCREAMING_SNAKE_CASE			:    Optional[Any]			)			->       Optional[int]:
             if name in self.keys() and value is not None:
                    # Don't call self.__setitem__ to avoid recursion errors
                    super().__setitem__(__SCREAMING_SNAKE_CASE   ,    __SCREAMING_SNAKE_CASE			)
             super().__setattr__(__SCREAMING_SNAKE_CASE   ,    __SCREAMING_SNAKE_CASE			)
  
  
  
      def __setitem__(							self			:    Optional[int]   ,    __SCREAMING_SNAKE_CASE			:    Any   ,    __SCREAMING_SNAKE_CASE			:    int			)			->       List[Any]:
             # Will raise a KeyException if needed
             super().__setitem__(__SCREAMING_SNAKE_CASE   ,    __SCREAMING_SNAKE_CASE			)
             # Don't call self.__setattr__ to avoid recursion errors
             super().__setattr__(__SCREAMING_SNAKE_CASE   ,    __SCREAMING_SNAKE_CASE			)
  
  
  
      def _a       (							self			:    Union[str, Any]			)			->       Tuple[Any]:
             return tuple(self[k] for k in self.keys()			)
  
  
  
  
  
style_context: 
  
  
  
  
  
  
  __A  							=  [0.485, 0.456, 0.406]
  __A  							=  [0.229, 0.224, 0.225]
  __A  							=  [0.5, 0.5, 0.5]
  __A  							=  [0.5, 0.5, 0.5]
  __A  							=  [0.4814_5466, 0.457_8275, 0.4082_1073]
  __A  							=  [0.2686_2954, 0.2613_0258, 0.2757_7711]
  
  
  
  
  