






'''simple docstring'''



import importlib.metadata
from typing import Union

from packaging.version import Version, parse

from .constants import STR_OPERATION_TO_FUNC


__UpperCamelCase   :							List[str]         =   parse(importlib.metadata.version("""torch"""))



def  __UpperCAmelCase						(					SCREAMING_SNAKE_CASE__:						Union[str, Version],       SCREAMING_SNAKE_CASE__:						str,       SCREAMING_SNAKE_CASE__:						str     )	->      Any:

   """simple docstring"""
   if operation not in STR_OPERATION_TO_FUNC.keys():
      raise ValueError(f"""`operation` must be one of {list(STR_OPERATION_TO_FUNC.keys()     )}, received {operation}"""     )
   __a					  =     STR_OPERATION_TO_FUNC[operation]
   if isinstance(SCREAMING_SNAKE_CASE__,       SCREAMING_SNAKE_CASE__     ):
      __a					  =     parse(importlib.metadata.version(SCREAMING_SNAKE_CASE__     )     )
   return operation(SCREAMING_SNAKE_CASE__,       parse(SCREAMING_SNAKE_CASE__     )     )



def  __UpperCAmelCase						(					SCREAMING_SNAKE_CASE__:						str,       SCREAMING_SNAKE_CASE__:						str     )	->      Tuple:

   """simple docstring"""
   return compare_versions(SCREAMING_SNAKE_CASE__,       SCREAMING_SNAKE_CASE__,       SCREAMING_SNAKE_CASE__     )







'''simple docstring'''



from math import isqrt



def  __UpperCAmelCase						(					SCREAMING_SNAKE_CASE__:						int     )	->      bool:

   """simple docstring"""
   return all(number % divisor != 0 for divisor in range(2,       isqrt(SCREAMING_SNAKE_CASE__     ) + 1     )     )



def  __UpperCAmelCase						(					SCREAMING_SNAKE_CASE__:						int = 10**6     )	->      int:

   """simple docstring"""
   __a					  =     0
   __a					  =     1
   __a					  =     7
   while prime_candidate < max_prime:
      primes_count += is_prime(SCREAMING_SNAKE_CASE__     )

      cube_index += 1
      prime_candidate += 6 * cube_index

   return primes_count


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