def save_aggregate_reports_to_splunk(self, aggregate_reports):
logger.debug("<STR_LIT>")<EOL>if type(aggregate_reports) == dict:<EOL><INDENT>aggregate_reports = [aggregate_reports]<EOL><DEDENT>if len(aggregate_reports) < <NUM_LIT:1>:<EOL><INDENT>return<EOL><DEDENT>data = self._common_data.copy()<EOL>json_str = "<STR_LIT>"<EOL>for report in aggregate_reports:<EOL><INDENT>for record in report["<STR_LIT>"]:<EOL><INDENT>new_report = dict()<EOL>for metadata in report["<STR_LIT>"]:<EOL><INDENT>new_report[metadata] = report["<STR_LIT>"][metadata]<EOL><DEDENT>new_report["<STR_LIT>"] = report["<STR_LIT>"]<EOL>new_report["<STR_LIT>"] = record["<STR_LIT:source>"][<EOL>"<STR_LIT>"]<EOL>new_report["<STR_LIT>"] = record["<STR_LIT:source>"]["<STR_LIT>"]<EOL>new_report["<STR_LIT>"] = record["<STR_LIT:source>"][<EOL>"<STR_LIT>"]<EOL>new_report["<STR_LIT>"] = record["<STR_LIT:source>"][<EOL>"<STR_LIT>"]<EOL>new_report["<STR_LIT>"] = record["<STR_LIT:count>"]<EOL>new_report["<STR_LIT>"] = record["<STR_LIT>"][<EOL>"<STR_LIT>"<EOL>]<EOL>new_report["<STR_LIT>"] = record["<STR_LIT>"]["<STR_LIT>"]<EOL>new_report["<STR_LIT>"] = record["<STR_LIT>"]["<STR_LIT>"]<EOL>new_report["<STR_LIT>"] = record["<STR_LIT>"]["<STR_LIT>"]<EOL>new_report["<STR_LIT>"] = record["<STR_LIT>"][<EOL>"<STR_LIT>"]<EOL>new_report["<STR_LIT>"] = record["<STR_LIT>"][<EOL>"<STR_LIT>"]<EOL>if "<STR_LIT>" in record["<STR_LIT>"]:<EOL><INDENT>new_report["<STR_LIT>"] = record["<STR_LIT>"][<EOL>"<STR_LIT>"]<EOL><DEDENT>if "<STR_LIT>" in record["<STR_LIT>"]:<EOL><INDENT>new_report["<STR_LIT>"] = record["<STR_LIT>"][<EOL>"<STR_LIT>"]<EOL><DEDENT>data["<STR_LIT>"] = "<STR_LIT>"<EOL>timestamp = human_timestamp_to_timestamp(<EOL>new_report["<STR_LIT>"])<EOL>data["<STR_LIT:time>"] = timestamp<EOL>data["<STR_LIT>"] = new_report.copy()<EOL>json_str += "<STR_LIT>".format(json.dumps(data))<EOL><DEDENT><DEDENT>if not self.session.verify:<EOL><INDENT>logger.debug("<STR_LIT>")<EOL><DEDENT>try:<EOL><INDENT>response = self.session.post(self.url, data=json_str,<EOL>timeout=self.timeout)<EOL>response = response.json()<EOL><DEDENT>except Exception as e:<EOL><INDENT>raise SplunkError(e.__str__())<EOL><DEDENT>if response["<STR_LIT:code>"] != <NUM_LIT:0>:<EOL><INDENT>raise SplunkError(response["<STR_LIT:text>"])<EOL><DEDENT>
Saves aggregate DMARC reports to Splunk

Args:
    aggregate_reports: A list of aggregate report dictionaries
    to save in Splunk