





import doctest
import logging
import os
import unittest
from pathlib import Path
from typing import List, Union

import transformers
from transformers.testing_utils import require_tf, require_torch, slow


lowercase      :       List[Any]									=  logging.getLogger()





@unittest.skip('''Temporarily disable the doc tests.'''	)
@require_torch
@require_tf
@slow
class  A__    (							unittest.TestCase	):




   """simple docstring"""



   def 							__lowercase		(					self					,  lowercase					,  lowercase = None					,  lowercase = None					,  lowercase = None					,  lowercase = True					,  )			->						Any:







          '''simple docstring'''

          a__						:	int =				[file for file in os.listdir(lowercase) if os.path.isfile(os.path.join(lowercase					,  lowercase))]

          if identifier is not None:
                 a__						:	int =				[file for file in files if identifier in file]

          if n_identifier is not None:
                 if isinstance(lowercase					,  lowercase):
                        for n_ in n_identifier:
                               a__						:	List[str] =				[file for file in files if n_ not in file]
                 else:
                        a__						:	Union[str, Any] =				[file for file in files if n_identifier not in file]

          a__						:	Union[str, Any] =				ignore_files or []
          ignore_files.append('__init__.py')
          a__						:	Tuple =				[file for file in files if file not in ignore_files]

          for file in files:
                 # Open all files
                 print('Testing'					,  lowercase)

                 if only_modules:
                        a__						:	Optional[Any] =				file.split('.')[0]
                        try:
                               a__						:	Any =				getattr(lowercase					,  lowercase)
                               a__						:	Union[str, Any] =				doctest.DocTestSuite(lowercase)
                               a__						:	Tuple =				unittest.TextTestRunner().run(lowercase)
                               self.assertIs(len(result.failures)					,  0)
                        except AttributeError:
                               logger.info(F'{module_identifier} is not a module.')
                 else:
                        a__						:	List[Any] =				doctest.testfile(str('..' / directory / file)					,  optionflags=doctest.ELLIPSIS)
                        self.assertIs(result.failed					,  0)

   def 							__lowercase		(					self)			->						str:







          '''simple docstring'''

          a__						:	Dict =				Path('src/transformers')
          a__						:	int =				'modeling'
          a__						:	List[str] =				[
              'modeling_ctrl.py',
              'modeling_tf_ctrl.py',
          ]
          self.analyze_directory(lowercase					,  identifier=lowercase					,  ignore_files=lowercase)

   def 							__lowercase		(					self)			->						Union[str, Any]:







          '''simple docstring'''

          a__						:	str =				Path('src/transformers')
          a__						:	List[str] =				'tokenization'
          self.analyze_directory(lowercase					,  identifier=lowercase)

   def 							__lowercase		(					self)			->						List[str]:







          '''simple docstring'''

          a__						:	List[str] =				Path('src/transformers')
          a__						:	List[str] =				'configuration'
          self.analyze_directory(lowercase					,  identifier=lowercase)

   def 							__lowercase		(					self)			->						Optional[Any]:







          '''simple docstring'''

          a__						:	Dict =				Path('src/transformers')
          a__						:	Dict =				['configuration', 'modeling', 'tokenization']
          self.analyze_directory(lowercase					,  n_identifier=lowercase)

   def 							__lowercase		(					self)			->						List[str]:







          '''simple docstring'''

          a__						:	Optional[int] =				Path('docs/source')
          a__						:	int =				['favicon.ico']
          self.analyze_directory(lowercase					,  ignore_files=lowercase					,  only_modules=lowercase)









def A_	(		A__		,      A__				)  ->		str:
       if a < 0 or b < 0:
              raise ValueError('the value of both inputs must be positive'				)

       a__						:	List[str] =				str(bin(A__				)				)[2:]  # remove the leading "0b"
       a__						:	Optional[int] =				str(bin(A__				)				)[2:]  # remove the leading "0b"

       a__						:	List[str] =				max(len(A__				)		,      len(A__				)				)

       return "0b" + "".join(
           str(int(char_a == '1' and char_b == '1'				)				)
           for char_a, char_b in zip(a_binary.zfill(A__				)		,      b_binary.zfill(A__				)				)				)


if __name__ == "__main__":
    import doctest

    doctest.testmod()


