





'''simple docstring'''




import importlib.metadata
from typing import Union

from packaging.version import Version, parse

from .constants import STR_OPERATION_TO_FUNC


__SCREAMING_SNAKE_CASE     :Tuple       =				parse(importlib.metadata.version('''torch'''))
def 	UpperCAmelCase_							(					__lowercase							:      Union[str, Version]			,     __lowercase							:      str			,     __lowercase							:      str       )		->       Union[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}'       )
     _UpperCAmelCase     							=   STR_OPERATION_TO_FUNC[operation]
     if isinstance(__lowercase			,     __lowercase       ):
          _UpperCAmelCase     							=   parse(importlib.metadata.version(__lowercase       )       )
     return operation(__lowercase			,     parse(__lowercase       )       )






def 	UpperCAmelCase_							(					__lowercase							:      str			,     __lowercase							:      str       )		->       Tuple:


     '''simple docstring'''



     return compare_versions(__lowercase			,     __lowercase			,     __lowercase       )











'''simple docstring'''




def 	UpperCAmelCase_							(					__lowercase							:      str       )		->       list:


     '''simple docstring'''



     if n_term == "":
          return []
     _UpperCAmelCase     							=   []
     for temp in range(int(__lowercase       )       ):
          series.append(f'1/{temp + 1}' if series else "1"       )
     return series


if __name__ == "__main__":
  __SCREAMING_SNAKE_CASE     :str       =				input('''Enter the last number (nth term) of the Harmonic Series''')
  print('''Formula of Harmonic Series => 1+1/2+1/3 ..... 1/n''')
  print(harmonic_series(nth_term))




