class_docstr: Main test class for the LI L2 reader.
class_docstr_tok: ["Main","test","class","for","the","LI","L2","reader","."]
docstr: Should covert milliseconds to timedelta.
docstr_tok: ["Should","covert","milliseconds","to","timedelta","."]
code: def test_milliseconds_to_timedelta(self, filetype_infos):
      """Should covert milliseconds to timedelta."""
      handler = LIL2NCFileHandler(
          "filename",
          {},
          extract_filetype_info(filetype_infos, "li_l2_lfl_nc"),
      )
  
      # Check flash_duration:
      dsid = make_dataid(name="flash_duration")
      dset = handler.get_dataset(dsid)
      assert dset.values.dtype == np.dtype("timedelta64[ns]")
  
      nobs = dset.shape[0]
      ref_data = np.linspace(0, 1000, nobs).astype("u2")
      ref_data = (ref_data * 1e6).astype("timedelta64[ns]")
  
      assert np.all(dset.values == ref_data)
  
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 20 for calling the TestLIL2 obj's underlying member method code with example usage: obj.test_milliseconds_to_timedelta(filetype_infos) without return types