https://www.mybluelinux.com/how-use-python-retry-decorator-function-with-api/