def look_for_books(citation_elements, kbs):
    """Look for books in our kb

    Create book tags by using the authors and the title to find books
    in our knowledge base
    """
    title = None
    for el in citation_elements:
        if el['type'] == 'QUOTED':
            title = el
            break

    if title:
        normalized_title = title['title'].upper()
        if normalized_title in kbs['books']:
            line = kbs['books'][normalized_title]
            el = {'type': 'BOOK',
                  'misc_txt': '',
                  'authors': line[0],
                  'title': line[1],
                  'year': line[2].strip(';')}
            citation_elements.append(el)
            citation_elements.remove(title)

    return citation_elements
Look for books in our kb

    Create book tags by using the authors and the title to find books
    in our knowledge base