Walk me through the implementation of retry logic for unstable API endpoints in a production pipeline.