code: def test_ahi_l2_area_def(himl2_filename, caplog):
      """Test reader handles area definition correctly."""
      from pyproj import CRS
  
      ps = "+a=6378137 +h=35785863 +lon_0=140.7 +no_defs +proj=geos +rf=298.257024882273 +type=crs +units=m +x_0=0 +y_0=0"
  
      # Check case where input data is correct size.
      fh = ahil2_filehandler(himl2_filename)
      clmk_id = make_dataid(name="cloudmask")
      area_def = fh.get_area_def(clmk_id)
      assert area_def.width == dimensions["Columns"]
      assert area_def.height == dimensions["Rows"]
      assert np.allclose(area_def.area_extent, exp_ext)
  
      expected_crs = CRS(ps)
      assert area_def.crs == expected_crs
  
      # Check case where input data is incorrect size.
      fh = ahil2_filehandler(himl2_filename)
      fh.nlines = 3000
      with pytest.raises(
          ValueError,
          match="Input L2 file is not a full disk Himawari scene..*",
      ):
          fh.get_area_def(clmk_id)
  
file_path: satpy/satpy/tests/reader_tests/test_ahi_l2_nc.py
imports: from datetime import datetime
  import numpy
  import pytest
  import xarray
  from satpy.readers.ahi_l2_nc import HIML2NCFileHandler
  from satpy.tests.utils import make_dataid
label_desc: Use image node_id 5 for calling a global function with example usage: test_ahi_l2_area_def(himl2_filename, caplog) without return types