def throttle_backoff_handler(details):
    """Callback to be used when a throttle backoff is invoked.

    For more details see: https://github.com/litl/backoff/#event-handlers

    Args:
        dictionary (dict): Details of the backoff invocation. Valid keys
            include:
                target: reference to the function or method being invoked.
                args: positional arguments to func.
                kwargs: keyword arguments to func.
                tries: number of invocation tries so far.
                wait: seconds to wait (on_backoff handler only).
                value: value triggering backoff (on_predicate decorator only).
    """
    activity = details['args'][0]
    activity.logger.info(
        'Throttle Exception occurred on try {}. Sleeping for {} seconds'.
        format(details['tries'], details['wait']))
