class_docstr: File handler for the IASI L2 SO2 BUFR product.
class_docstr_tok: ["File","handler","for","the","IASI","L2","SO2","BUFR","product","."]
docstr: Get BUFR attributes.
docstr_tok: ["Get","BUFR","attributes","."]
code: def get_attribute(self, key):
      """Get BUFR attributes."""
      # This function is inefficient as it is looping through the entire
      # file to get 1 attribute. It causes a problem though if you break
      # from the file early - dont know why but investigating - fix later
  
      fh = open(self.filename, "rb")
      while True:
          # get handle for message
          bufr = ec.codes_bufr_new_from_file(fh)
          if bufr is None:
              break
          ec.codes_set(bufr, "unpack", 1)
          attr = ec.codes_get(bufr, key)
          ec.codes_release(bufr)
  
      fh.close()
      return attr
  
file_path: satpy/satpy/readers/iasi_l2_so2_bufr.py
imports: import logging
  from datetime import datetime
  import dask.array
  import numpy
  import xarray
  from satpy.readers.file_handlers import BaseFileHandler
  from satpy.utils import get_legacy_chunk_size
label_desc: Use image node_id 6 for calling the IASIL2SO2BUFR obj's underlying member method code with example usage: obj.get_attribute(key) and returns: attr