class_docstr: KinesisPayload class
docstr: Pre-parsing method for Kinesis records
  
  Decodes the base64 payload from within the record, and attempts to decompress
  the data. If the data is not compressed, this falls back on the original content.
  
  Yields:
      Instances of PayloadRecord back to the caller containing the current log data
docstr_tok: ["Pre-parsing","method","for","Kinesis","records","Decodes","the","base64","payload","from","within","the","record",",","and","attempts","to","decompress","the","data",".","If","the","data","is","not","compressed",",","this","falls","back","on","the","original","content",".","Yields",":","Instances","of","PayloadRecord","back","to","the","caller","containing","the","current","log","data"]
code: def _pre_parse(self):
      """Pre-parsing method for Kinesis records
  
      Decodes the base64 payload from within the record, and attempts to decompress
      the data. If the data is not compressed, this falls back on the original content.
  
      Yields:
          Instances of PayloadRecord back to the caller containing the current log data
      """
      LOGGER.debug(
          "Pre-parsing record from Kinesis. eventID: %s, eventSourceARN: %s",
          self.raw_record["eventID"],
          self.raw_record["eventSourceARN"],
      )
  
      # Kinesis records have to potential to be gzipped, so try to decompress
      record = base64.b64decode(self.raw_record["kinesis"]["data"])
      try:
          record = zlib.decompress(record, 47)
      except zlib.error:
          pass
  
      yield PayloadRecord(record)
  
file_path: streamalert/streamalert/classifier/payload/kinesis.py
imports: import logging
  import base64
  import zlib
  from streamalert.classifier.payload.payload_base import PayloadRecord, RegisterInput, StreamPayload
  from streamalert.shared.logger import get_logger
label_desc: Use image node_id 2 for calling the KinesisPayload obj's underlying member method code with example usage: obj._pre_parse() without return types