def insert_roi(conn, cur, exp_id, series, offset, size):
    """Inserts an ROI into the database.
    
    Args:
        conn (:obj:`sqlite3.Connection): Connection object.
        cur (:obj:`sqlite3.Cursor): Cursor object.
        exp_id (int): ID of the experiment.
        series (int): Series within the experiment. Can be None, in which case
            the series will be set to 0.
        offset (List[int): ROI offset as (x, y, z).
        size (List[int): ROI size as (x, y, z)
    
    Returns:
        int, str: ID of the selected or inserted row and the feedback string.
    """
    if series is None:
        series = 0
    cur.execute("INSERT OR REPLACE INTO rois (experiment_id, series, "
                                             "offset_x, offset_y, "
                                             "offset_z, size_x, size_y, "
                                             "size_z) "
                "VALUES (?, ?, ?, ?, ?, ?, ?, ?)", 
                (exp_id, series, *offset, *size))
    feedback = "ROI inserted with offset {} and size {}".format(offset, size)
    print(feedback)
    conn.commit()
    return cur.lastrowid, feedback