Retry a flaky function whenever an exception occurs until it works
copied from cf-staging / tenacityTenacity is general-purpose retrying library, written in Python, to simplify the task of adding retry behavior to just about anything. It originates from a fork of Retrying