I'm using the following async python code to loop through a CSV file and make POST calls to an API.  I am wondering how I can implement retry logic for those rows that return an exception, while ensuring I am doing so within the structure of async programming:  # import argparse
import pandas
import sys
import os
import datetime
import config
from candidate import Candidate
from bgc_object import Invitation, Report
from continuous import ContinuousMonitoring
from logger import setup_logger
from utils import format_work_location, get_choice
from aiolimiter import AsyncLimiter
import cProfile
import pstats
import aiohttp
import asyncio
from rich import print
from rich.console import Console
from rich.progress import track
from rich.table import Table
from rich import box


# Initialize logging
logger = setup_logger()
# create a global console object for the "Rich" formatting library
console = Console()
# Set up rate limiting threshold for API calls
limiter = AsyncLimiter(500)

object_classes = {
    'candidate': Candidate,
    'invitation': Invitation,
    'report': Report,
    'c_crim': ContinuousMonitoring,
    'c_mvr': ContinuousMonitoring
}

# 'object_subtype' is only used with Continuous Monitoring enrollments...
async def create_records(session, consumers_df, object_type, object_subtype=None):
    # create a cProfile object
    profiler = cProfile.Profile()
    # start profiling
    profiler.enable()
    # object_type can be "candidate", "invitation", or "report"
    if object_type == "candidate":
        id_field = "candidate_id"
        error_field = "candidate_error"
    elif object_type == "invitation":
        id_field = "invitation_id"
        error_field = "invitation_error"
    elif object_type == "report":
        id_field = "report_id"
        error_field = "report_error"
    elif object_type == "c_crim":
        id_field = "c_crim_id"
        error_field = "c_crim_error"
    elif object_type == "c_mvr":
        id_field = "c_mvr_id"
        error_field = "c_mvr_error"
    else:
        raise ValueError("Invalid object_type. Expected 'candidate', 'invitation', 'report',\
                         'c_crim', 'c_mvr'.")

    # create list containing the specific fields of interest for each object
    field_map = {
    'candidate': ['first_name', 'last_name', 'phone', 'email', 'custom_id', 'work_locations', 'ssn', 'dob', 'zipcode',
                  'middle_name', 'driver_license_number', 'driver_license_state', 'copy_requested'],
    'invitation': ['candidate_id', 'package', 'node', 'work_locations', 'tag Provide the entire answer in JSON format.
user