async def METHOD_NAME(
    postgres_db, service_run_id: str, modified_at: datetime | None = None
) -> dict | None:
    async for attempt in AsyncRetrying(
        wait=wait_fixed(0.2),
        stop=stop_after_delay(10),
        retry=retry_if_exception_type(AssertionError),
        reraise=True,
    ):
        with attempt, postgres_db.connect() as con:
            con.execute(resource_tracker_credit_transactions.select())
            result = con.execute(
                sa.select(resource_tracker_credit_transactions).where(
                    resource_tracker_credit_transactions.c.service_run_id
                    == service_run_id
                )
            )
            row: dict | None = result.first()
            assert row
            if modified_at:
                assert row[15] > modified_at
            return row
    return None