code: def test_too_many_entries():
      ifd = TiffImagePlugin.ImageFileDirectory_v2()
  
      #    277: ("SamplesPerPixel", SHORT, 1),
      ifd._tagdata[277] = struct.pack("hh", 4, 4)
      ifd.tagtype[277] = TiffTags.SHORT
  
      # Should not raise ValueError.
      pytest.warns(UserWarning, lambda: ifd[277])
  
imports: import io
  import struct
  import pytest
  from PIL import Image, TiffImagePlugin, TiffTags
  from PIL.TiffImagePlugin import IFDRational
  from .helper import assert_deep_equal, hopper
label_desc: Use image node_id 19 for calling a global function with example usage: test_too_many_entries() without return types