def get_checkpoint_field_and_value(self):
        """Fetch last data from checkpoint file.

        Returns:
            None/json: last_data
        """
        try:
            __method_name = inspect.currentframe().f_code.co_name
            field = None
            checkpoint = self.state.get()
            if checkpoint:
                checkpoint = json.loads(checkpoint)
                if checkpoint.get("from", None):
                    field, checkpoint = "from", checkpoint.get("from")
                elif checkpoint.get("event_timestamp_gte"):
                    field, checkpoint = "event_timestamp_gte", checkpoint.get("event_timestamp_gte")
                else:
                    field, checkpoint = "event_timestamp_gte", self.start_time
                    self.state.post(json.dumps({"event_timestamp_gte": self.start_time}))
            else:
                field, checkpoint = "event_timestamp_gte", self.start_time
                self.state.post(json.dumps({"event_timestamp_gte": self.start_time}))
            self.applogger.info(
                '{}(method={}) : {} : Checkpoint field="{}" and value="{}"'.format(
                    consts.LOGS_STARTS_WITH,
                    __method_name,
                    self.function_name,
                    field,
                    checkpoint,
                )
            )
            return field, checkpoint
        except Exception as ex:
            self.applogger.error(
                '{}(method={}) : {} : Unexpected error while getting checkpoint: err="{}"'.format(
                    consts.LOGS_STARTS_WITH, __method_name, self.function_name, str(ex)
                )
            )
            raise Exception(ex)
Fetch last data from checkpoint file.

        Returns:
            None/json: last_data
        
Solutions/Vectra XDR/Data Connectors/VectraDataConnector/SharedCode/collector.py