input: Write a function to fetch books by title or author from a list of dictionaries.
  assert fetch_books(books, title='1984') == [{'title': '1984', 'author': 'George Orwell'}]
  assert fetch_books(books, author='William Golding') == [{'title': 'Lord of the Flies', 'author': 'William Golding'}]
  assert fetch_books(books) == books
output: def fetch_books(books, title=None, author=None):
      if title:
          return [book for book in books if book['title'] == title]
      elif author:
          return [book for book in books if book['author'] == author]
      else:
          return books