def get_author_with_books(search_str, books_list):
  """
  Get a dictionary of books and their authors based on search string

  Parameters:
    search_str: String to search for(case-sensitive).
    books_list: The list of book to search in
  Returns:
    authors_with_books: A dictionary of authors with their books.
  """
  print("You search for authors with " + search_str + " in their names")

  authors_with_books = {}
  for book in books_list:
      for name in book["author"]:
        '''Check if the author's name has search string'''
        if search_str in name:
          if name not in authors_with_books:
            authors_with_books[name] = [book["title"]]
          else:
            authors_with_books[name].append(book["title"])
  return authors_with_books