input: Write a python function to get book details by ID.
  assert get_book_by_id(0) == {'id': 0, 'title': 'The Lord of the Rings', 'author': 'J. R. R. Tolkien'}
  assert get_book_by_id(1) == {'id': 1, 'title': 'The Alchemist', 'author': 'Paulo Coelho'}
  assert get_book_by_id(2) == {'id': 2, 'title': 'The Catcher in the Rye', 'author': 'J. D. Salinger'}
output: def get_book_by_id(book_id):
      books = [
          {'id': 0, 'title': 'The Lord of the Rings', 'author': 'J. R. R. Tolkien'},
          {'id': 1, 'title': 'The Alchemist', 'author': 'Paulo Coelho'},
          {'id': 2, 'title': 'The Catcher in the Rye', 'author': 'J. D. Salinger'}
      ]
      
      for book in books:
          if book['id'] == book_id:
              return book