class_docstr: Reader for GAC and LAC data.
class_docstr_tok: ["Reader","for","GAC","and","LAC","data","."]
docstr: Select user-defined scanlines and/or strip invalid coordinates.
  
  Furthermore, update scanline timestamps.
  
  Args:
      data: Data to be sliced
      times: Scanline timestamps
  Returns:
      Sliced data and timestamps
docstr_tok: ["Select","user-defined","scanlines","and\/or","strip","invalid","coordinates",".","Furthermore",",","update","scanline","timestamps",".","Args",":","data",":","Data","to","be","sliced","times",":","Scanline","timestamps","Returns",":","Sliced","data","and","timestamps"]
code: def slice(self, data, times):  # noqa: A003
      """Select user-defined scanlines and/or strip invalid coordinates.
  
      Furthermore, update scanline timestamps.
  
      Args:
          data: Data to be sliced
          times: Scanline timestamps
      Returns:
          Sliced data and timestamps
  
      """
      sliced = self._slice(data)
      times = self._slice(times)
      self._start_time = times[0].astype(datetime)
      self._end_time = times[-1].astype(datetime)
      return sliced, times
  
imports: import logging
  from datetime import datetime, timedelta
  import dask.array
  import numpy
  import pygac.utils
  import xarray
  from pygac.gac_klm import GACKLMReader
  from pygac.gac_pod import GACPODReader
  from pygac.lac_klm import LACKLMReader
  from pygac.lac_pod import LACPODReader
  from satpy.readers.file_handlers import BaseFileHandler
  from satpy.utils import get_legacy_chunk_size
label_desc: Use image node_id 4 for calling the GACLACFile obj's underlying member method code with example usage: obj.slice(data, times) and returns: sliced,  times