def get_book_info(cursor, real_dict_cursor, book_id,
                  book_version, page_id, page_version):
    """Return information about a given book.

    Return the book's title, id, shortId, authors and revised date.
    Raise HTTPNotFound if the page is not in the book.
    """
    book_ident_hash = join_ident_hash(book_id, book_version)
    page_ident_hash = join_ident_hash(page_id, page_version)
    tree = get_tree(book_ident_hash, cursor)

    # Check if the page appears in the book tree
    if not tree or page_ident_hash not in flatten_tree_to_ident_hashes(tree):
        # Return a 404 error if the page is not actually in the book tree
        raise httpexceptions.HTTPNotFound()

    sql_statement = """
    SELECT m.name as title,
           ident_hash(m.uuid, m.major_version, m.minor_version)
           as ident_hash,
           short_ident_hash(m.uuid, m.major_version, m.minor_version)
           as shortId, ARRAY(
               SELECT row_to_json(user_row)
               FROM (
                   SELECT u.username, u.first_name as firstname,
                        u.last_name as surname, u.full_name as fullname,
                        u.title, u.suffix
               ) as user_row
           ) as authors,
           m.revised
    FROM modules m
    JOIN users as u on u.username = ANY(m.authors)
    WHERE ident_hash(m.uuid, m.major_version, m.minor_version) = %s
    """
    real_dict_cursor.execute(sql_statement, vars=(book_ident_hash,))
    return real_dict_cursor.fetchone()
Return information about a given book.

    Return the book's title, id, shortId, authors and revised date.
    Raise HTTPNotFound if the page is not in the book.