code: def group_records_by_type(records, update_events):
      
      update_records, delete_records = [], []
      for record in records:
          if record.get("detail-type", "") == "Scheduled Event":
              LOG.error("[X] Received a Scheduled Event in the Queue... Please check that your environment is set up"
                        " correctly.")
              continue
  
          # Ignore SQS junk messages (like subscription notices and things):
          if not record.get("detail"):
              continue
  
          # Do not capture error events:
          if not record["detail"].get("errorCode"):
              if record['detail']['eventName'] in update_events:
                  update_records.append(record)
              else:
                  delete_records.append(record)
  
      return update_records, delete_records
docs: Break records into two lists; create/update events and delete events.
  
      :param records:
      :param update_events:
      :return update_records, delete_records: