def get_books_by_author(args, books):
    """
    Get books whose author name contains the arguments
    :param args: args object containing all arguments
    :param books: A list of book objects read from csv file
    :return: A dictionary with matched authors' names as key and a list of their
             book objects as value.
    """
    if not args.author:
        return None

    author_book_dict = {}
    # Create a key value pair for every author that matches the arguments
    for arg in args.author:
        for book in books:
            if arg.lower() in book.author.lower():
                if not book.author in author_book_dict.keys():
                    author_book_dict[book.author] = []

    # Fill in the books written by every author in the dictionary
    for book in books:
        if book.author in author_book_dict.keys():
            author_book_dict[book.author].append(book)

    
    return author_book_dict