





'''simple docstring'''

import math

def     __magic_name__							(				__UpperCAmelCase   )    ->       bool:

   '''simple docstring'''







   assert isinstance(__UpperCAmelCase				,						__UpperCAmelCase   ) and (
       number >= 0
   ), "'number' must been an int and positive"

   if 1 < number < 4:
      # 2 and 3 are primes
      return True
   elif number < 2 or not number % 2:
      # Negatives, 0, 1 and all even numbers are not primes
      return False

   __SCREAMING_SNAKE_CASE   				=							range(3				,						int(math.sqrt(__UpperCAmelCase   ) + 1   )				,						2   )
   return not any(not number % i for i in odd_numbers   )







def     __magic_name__							(				__UpperCAmelCase				,						__UpperCAmelCase=1				,						**__UpperCAmelCase   )    ->       str:

   '''simple docstring'''







   __SCREAMING_SNAKE_CASE   				=							factor * value
   __SCREAMING_SNAKE_CASE   				=							value

   while not is_prime(__UpperCAmelCase   ):
      value += 1 if not ("desc" in kwargs and kwargs["desc"] is True) else -1

   if value == first_value_val:
      return next_prime(value + 1				,						**__UpperCAmelCase   )
   return value












'''simple docstring'''






import os


# All paths are set with the intent you should run this script from the root of the repo with the command
# python utils/check_doctest_list.py
A__							:  Optional[int]    ='''.'''


if __name__ == "__main__":
      A__							:  int    =os.path.join(REPO_PATH, '''utils/documentation_tests.txt''')
      A__							:  Optional[int]    =[]
      A__							:  Tuple    =[]
      with open(doctest_file_path) as fp:
            for line in fp:
                  A__							:  Optional[Any]    =line.strip()
                  A__							:  Union[str, Any]    =os.path.join(REPO_PATH, line)
                  if not (os.path.isfile(path) or os.path.isdir(path)):
                        non_existent_paths.append(line)
                  all_paths.append(path)
      if len(non_existent_paths) > 0:
            A__							:  List[Any]    ='''\n'''.join(non_existent_paths)
            raise ValueError(F"""`utils/documentation_tests.txt` contains non-existent paths:\n{non_existent_paths}""")
      if all_paths != sorted(all_paths):
            raise ValueError('''Files in `utils/documentation_tests.txt` are not in alphabetical order.''')






