def which_book(l, soup):

    """Determine which book in a bs4 soup contains a given line.

    Args:
        l (bs4 <line>): Line to check
        soup (bs4 soup): Soup to check in

    Returns:
        (int): The index of the first 'division' containing l (0-based) or None
    """

    for d in soup("division"):
        if l in d:
            return d["title"]
    return None