def METHOD_NAME(txn: LoggingTransaction) -> Optional[str]:
    sql = """
            SELECT user_id FROM profiles
            WHERE user_id > ?
            ORDER BY user_id
            LIMIT 1 OFFSET 1000
          """
    txn.execute(sql, (lower_bound_id,))
    res = txn.fetchone()
    if res:
        upper_bound_id = res[0]
        return upper_bound_id
    else:
        return None