class_docstr: Handles preparing and sending data from the classifier function to Kinesis Firehose
docstr: Inspect the response and remove any records records that have successfully to sent
  
  For each record, the index of the response element is the same as the index
  used in the request array.
  
  Args:
      batch (list): List of dicts with JSON dumped records that are being
          sent to Firehose. Format is:
          [{'Data': <json-dumped-rec>}, {'Data': <json-dumped-rec>}]
      response (dict): Response object from the boto3.client.put_record_batch call
          that contains metadata on the success status of the call
docstr_tok: ["Inspect","the","response","and","remove","any","records","records","that","have","successfully","to","sent","For","each","record",",","the","index","of","the","response","element","is","the","same","as","the","index","used","in","the","request","array",".","Args",":","batch","(","list",")",":","List","of","dicts","with","JSON","dumped","records","that","are","being","sent","to","Firehose",".","Format","is",":","[","{","'Data","'",":","<","json-dumped-rec",">","}",",","{","'Data","'",":","<","json-dumped-rec",">","}","]","response","(","dict",")",":","Response","object","from","the","boto3.client.put_record_batch","call","that","contains","metadata","on","the","success","status","of","the","call"]
code: def _strip_successful_records(batch, response):
      """Inspect the response and remove any records records that have successfully to sent
  
      For each record, the index of the response element is the same as the index
      used in the request array.
  
      Args:
          batch (list): List of dicts with JSON dumped records that are being
              sent to Firehose. Format is:
              [{'Data': <json-dumped-rec>}, {'Data': <json-dumped-rec>}]
          response (dict): Response object from the boto3.client.put_record_batch call
              that contains metadata on the success status of the call
      """
      success_indices = [
          idx
          for idx, rec in enumerate(response["RequestResponses"])
          if rec.get("RecordId")
      ]
  
      for idx in sorted(success_indices, reverse=True):
          del batch[idx]
  
imports: from collections import defaultdict
  import json
  import hashlib
  import re
  import backoff
  import boto3
  from botocore.exceptions import ClientError, HTTPClientError
  from botocore.exceptions import ConnectionError
  from streamalert.shared import CLASSIFIER_FUNCTION_NAME
  import streamalert.shared.helpers.boto
  from streamalert.shared.logger import get_logger
  from streamalert.shared.metrics import MetricLogger
  from streamalert.shared.backoff_handlers import backoff_handler, giveup_handler, success_handler
label_desc: Use image node_id 6 for calling the FirehoseClient obj's underlying member method code with example usage: obj._strip_successful_records(batch, response) without return types