def process_alerts_data(self, alerts, offset_to_post, checkpoint_table_object: ExportsTableStore):
        """Process alerts data to fetch related activity.

        Args:
            alerts (list): list of alerts
        """
        __method_name = inspect.currentframe().f_code.co_name
        try:
            activity_uuid_list = []
            alerts_data_to_post = []
            for alert in alerts:
                if int(time.time()) >= self.start_time + consts.FUNCTION_APP_TIMEOUT_SECONDS:
                    raise ArmisTimeOutException()
                activity_uuids = alert.get("activityUUIDs", [])
                if len(activity_uuid_list) + len(activity_uuids) <= consts.CHUNK_SIZE:
                    activity_uuid_list.extend(activity_uuids)
                    alerts_data_to_post.append(alert)
                else:
                    offset_to_post = self.post_alert_activity_data(
                        alerts_data_to_post, activity_uuid_list, offset_to_post, checkpoint_table_object
                    )
                    alerts_data_to_post = []
                    activity_uuid_list = []
                    if len(activity_uuids) < consts.CHUNK_SIZE:
                        activity_uuid_list.extend(activity_uuids)
                        alerts_data_to_post.append(alert)
                    else:
                        logging.info(
                            consts.LOG_FORMAT.format(
                                __method_name, "Chunk size is greater than {}.".format(consts.CHUNK_SIZE)
                            )
                        )
                        self.process_large_chunks_of_activity_data(
                            activity_uuids
                        )
                        self.azuresentinel.post_data(
                            json.dumps([alert], indent=2), consts.ARMIS_ALERTS_TABLE, "armis_alert_time"
                        )
                        logging.info(consts.LOG_FORMAT.format(__method_name, "Posted Alerts count : 1."))
                        self.total_alerts_posted += 1
                        offset_to_post += 1
                        logging.info(
                            consts.LOG_FORMAT.format(
                                __method_name, "Saving offset '{}' in checkpoint".format(offset_to_post)
                            )
                        )
                        checkpoint_table_object.merge(
                            "armisalertactivity", "alertactivitycheckpoint", {"offset": offset_to_post}
                        )
            self.post_alert_activity_data(
                alerts_data_to_post, activity_uuid_list, offset_to_post, checkpoint_table_object
            )
        except ArmisException:
            raise ArmisException()

        except ArmisTimeOutException:
            raise ArmisTimeOutException()

        except Exception as err:
            logging.error(
                consts.LOG_FORMAT.format(
                    __method_name, "Error while processing alerts and activity data : {}.".format(err)
                )
            )
            raise ArmisException()
Process alerts data to fetch related activity.

        Args:
            alerts (list): list of alerts
        
Solutions/Armis/Data Connectors/ArmisAlertsActivities/ArmisAlertActivitySentinelConnector/__init__.py