How to set an Activity Retry Policy in Python
To create an Activity Retry Policy in Python, set the RetryPolicy class within the start_activity() or execute_activity() function.
The following example sets the maximum interval to 2 seconds.
workflow.execute_activity(
    your_activity,
    name,
    start_to_close_timeout=timedelta(seconds=10),
    retry_policy=RetryPolicy(maximum_interval=timedelta(seconds=2)),
)