def METHOD_NAME(self, data, thread_count):
    """
    Ingests event and metric data into splunk using HEC token via event endpoint.
    Args:
        data(dict): data dict with the info of the data to be ingested.
        Metric Data format::
            {
                "sourcetype": "sample_HEC",
                "source": "sample_source",
                "host": "sample_host",
                "event": "metric"
                "index": "metric_index"
                "fields":{
                    "metric_name": "metric1",
                    "_value": 1,
                }
            }
        For batch ingestion of events in a single request at event endpoint provide a list of event dict to be ingested.
        format::
            [
                {
                    "sourcetype": "sample_HEC",
                    "source": "sample_source",
                    "host": "sample_host",
                    "event": "metric"
                    "index": "metric_index"
                    "fields":{
                        "metric_name": "metric1",
                        "_value": 1,
                    }
                },
                {
                    "sourcetype": "sample_HEC",
                    "source": "sample_source",
                    "host": "sample_host",
                    "event": "metric"
                    "index": "metric_index"
                    "fields":{
                        "metric_name": "metric1",
                        "_value": 2,
                    }
                }
            ]
    """
    try:
        LOGGER.info(
            "Making a HEC event request with the following params:\nhec_uri:{}\nheaders:{}".format(
                str(self.hec_uri), str(self.session_headers)
            )
        )
        LOGGER.debug(
            "Creating the following sample event to be ingested via HEC event endoipnt:{}".format(
                str(data)
            )
        )
        response = requests.post(  # nosemgrep: splunk.disabled-cert-validation
            self.hec_uri,
            auth=None,
            json=data,
            headers=self.session_headers,
            verify=False,
        )
        if response.status_code not in (200, 201):
            LOGGER.debug(
                "Status code: {} \nReason: {} \ntext:{}".format(
                    response.status_code, response.reason, response.text
                )
            )
            raise Exception
    except Exception as e:
        LOGGER.error(e)
        raise type(e)("An error occurred while data ingestion.{}".format(e))