class_docstr: Main test class for the LI L2 reader.
class_docstr_tok: ["Main","test","class","for","the","LI","L2","reader","."]
docstr: Should accumulate index offsets.
docstr_tok: ["Should","accumulate","index","offsets","."]
code: def test_apply_accumulate_index_offset(self, filetype_infos):
      """Should accumulate index offsets."""
      handler = LIL2NCFileHandler(
          "filename",
          {},
          extract_filetype_info(filetype_infos, "li_l2_le_nc"),
      )
  
      # Check time offset:
      dsid = make_dataid(name="l1b_chunk_offsets_north_sector")
      dset = handler.get_dataset(dsid)
  
      nobs = dset.shape[0]
      ref_data = (np.arange(nobs)).astype("u4")
      # check first execution without offset
      assert np.all(dset.values == ref_data)
      # check that the offset is being stored
      assert handler.current_ds_info["__index_offset"] == 123
  
      # check execution with offset value
      # this simulates the case where we are loading this variable from multiple files and concatenating it
      dset = handler.get_dataset(dsid, handler.current_ds_info)
      assert np.all(dset.values == ref_data + 123)
  
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 21 for calling the TestLIL2 obj's underlying member method code with example usage: obj.test_apply_accumulate_index_offset(filetype_infos) without return types