code: def test_book_and_sheets_consistent(ext):
      # GH#45687 - Ensure sheets is updated if user modifies book
      with tm.ensure_clean(ext) as f:
          with ExcelWriter(f, engine="openpyxl") as writer:
              assert writer.sheets == {}
              sheet = writer.book.create_sheet("test_name", 0)
              assert writer.sheets == {"test_name": sheet}
  
imports: import contextlib
  from pathlib import Path
  import re
  import numpy
  import pytest
  import pandas
  from pandas import DataFrame
  import pandas._testing
  from pandas.io.excel import ExcelWriter, _OpenpyxlWriter
  from pandas.io.excel._openpyxl import OpenpyxlReader
label_desc: Use image node_id 18 for calling a global function with example usage: test_book_and_sheets_consistent(ext) without return types