input: Write a python function to retrieve books by a specific author from a given list of books.
  assert get_books_by_author('J.K. Rowling') == [{'name': 'Harry Potter and the Philosopher\'s Stone', 'author': 'J.K. Rowling'}, {'name': 'Harry Potter and the Chamber of Secrets', 'author': 'J.K. Rowling'}, {'name': 'Harry Potter and the Prisoner of Azkaban', 'author': 'J.K. Rowling'}, {'name': 'Harry Potter and the Goblet of Fire', 'author': 'J.K. Rowling'}]
  assert get_books_by_author('Tolkien') == []
  assert get_books_by_author('J.K. Rowling') == [{'name': 'Harry Potter and the Philosopher\'s Stone', 'author': 'J.K. Rowling'}, {'name': 'Harry Potter and the Chamber of Secrets', 'author': 'J.K. Rowling'}, {'name': 'Harry Potter and the Prisoner of Azkaban', 'author': 'J.K. Rowling'}, {'name': 'Harry Potter and the Goblet of Fire', 'author': 'J.K. Rowling'}]
output: def get_books_by_author(author):
      books = [
          {'name': 'Harry Potter and the Philosopher\'s Stone', 'author': 'J.K. Rowling'},
          {'name': 'Harry Potter and the Chamber of Secrets', 'author': 'J.K. Rowling'},
          {'name': 'Harry Potter and the Prisoner of Azkaban', 'author': 'J.K. Rowling'},
          {'name': 'Harry Potter and the Goblet of Fire', 'author': 'J.K. Rowling'},
          {'name': 'The Hobbit', 'author': 'J.R.R. Tolkien'},
          {'name': 'The Lord of the Rings', 'author': 'J.R.R. Tolkien'}
      ]
      return [book for book in books if book['author'] == author]