



'''simple docstring'''





from packaging import version

from .import_utils import is_accelerate_available


if is_accelerate_available():
    import accelerate





def   a_   (		_UpperCAmelCase    :      List[str]				)    ->  Optional[Any]:
      if not is_accelerate_available():
            return method
      __snake_case :   List[str]													=    version.parse(accelerate.__version__				).base_version
      if version.parse(_UpperCAmelCase				) < version.parse('0.17.0'				):
            return method

      def wrapper(self    :      str ,*_UpperCAmelCase    :      Tuple ,**_UpperCAmelCase    :      List[Any]				):
            if hasattr(self ,'_hf_hook'				) and hasattr(self._hf_hook ,'pre_forward'				):
                  self._hf_hook.pre_forward(self				)
            return method(self ,*_UpperCAmelCase ,**_UpperCAmelCase				)

      return wrapper








'''simple docstring'''





from __future__ import annotations





def   a_   (		_UpperCAmelCase    :      list[int]				)    ->  bool:
      return len(set(_UpperCAmelCase				)				) == len(_UpperCAmelCase				)


if __name__ == "__main__":
    import doctest

    doctest.testmod()



