class_docstr: File handler for the SGLI l1b data.
class_docstr_tok: ["File","handler","for","the","SGLI","l1b","data","."]
docstr: Prepare the dataset according to key.
docstr_tok: ["Prepare","the","dataset","according","to","key","."]
code: def prepare_dataset(self, key, dataset):
      """Prepare the dataset according to key."""
      with xr.set_options(keep_attrs=True):
          if key["name"].startswith(("VN", "SW", "P")):
              dataset = self.get_visible_dataset(key, dataset)
          elif key["name"].startswith("TI"):
              dataset = self.get_ir_dataset(key, dataset)
          elif key["name"].startswith(("longitude", "latitude")):
              dataset = self.get_lon_lats(key)
          elif "angle" in key["name"]:
              dataset = self.get_angles(key)
          else:
              raise KeyError(f"Unrecognized dataset {key['name']}")
      return dataset
  
imports: import logging
  from datetime import datetime
  import dask.array
  import h5py
  import numpy
  import xarray
  from dask.array.core import normalize_chunks
  from satpy.readers.file_handlers import BaseFileHandler
label_desc: Use image node_id 5 for calling the HDF5SGLI obj's underlying member method code with example usage: obj.prepare_dataset(key, dataset) and returns: dataset