class_docstr: Main test class for the LI L2 reader.
class_docstr_tok: ["Main","test","class","for","the","LI","L2","reader","."]
docstr: Test the placements of pixel value with area definition.
docstr_tok: ["Test","the","placements","of","pixel","value","with","area","definition","."]
code: def test_with_area_def_pixel_placement(self, filetype_infos):
      """Test the placements of pixel value with area definition."""
      # with area definition
      FakeLIFileHandlerBase.schema_parameters = TestLIL2.param_provider
  
      handler = LIL2NCFileHandler(
          "filename",
          {},
          extract_filetype_info(filetype_infos, "li_l2_af_nc"),
          with_area_definition=True,
      )
      dsid = make_dataid(name="flash_accumulation")
  
      # Retrieve the 2D array:a
      arr = handler.get_dataset(dsid).values
  
      # Retrieve the x/y coordinates:
      xarr = handler.get_measured_variable("x").values.astype(int)
      yarr = handler.get_measured_variable("y").values.astype(int)
  
      handler_without_area_def = LIL2NCFileHandler(
          "filename",
          {},
          extract_filetype_info(filetype_infos, "li_l2_af_nc"),
          with_area_definition=False,
      )
  
      FakeLIFileHandlerBase.schema_parameters = None
  
      # prepare reference array
      data = handler_without_area_def.get_dataset(dsid).values
      ref_arr = np.empty(LI_GRID_SHAPE, dtype=arr.dtype)
      ref_arr[:] = np.nan
      rows = LI_GRID_SHAPE[0] - yarr
      cols = xarr - 1
      ref_arr[rows, cols] = data
  
      # Check all nan values are at the same locations:
      assert np.all(np.isnan(arr) == np.isnan(ref_arr))
  
      # Check all finite values are the same:
      assert np.all(
          arr[np.isfinite(arr)] == ref_arr[np.isfinite(ref_arr)]
      )
  
imports: import os
  from datetime import datetime
  from unittest import mock
  import numpy
  import pytest
  import xarray
  from pyproj import Proj
  from satpy._config import config_search_paths
  from satpy.readers.li_base_nc import LINCFileHandler
  from satpy.readers.li_l2_nc import LI_GRID_SHAPE, LIL2NCFileHandler
  from satpy.readers.yaml_reader import load_yaml_configs
  from satpy.tests.reader_tests._li_test_utils import FakeLIFileHandlerBase, extract_filetype_info, get_product_schema, products_dict
  from satpy.tests.utils import make_dataid
label_desc: Use image node_id 42 for calling the TestLIL2 obj's underlying member method code with example usage: obj.test_with_area_def_pixel_placement(filetype_infos) without return types