def pull_and_push_entities_data(
        self,
        endpoint,
        checkpoint_value,
        table_name,
        entity_type,
        entity_state,
        fields=None,
    ):
        """
        To pull the entities data from vectra and push into sentinel.

        Args:
            endpoint (str): endpoint url
            checkpoint_value (str): Checkpoint value from checkpoint file
            table_name (str): Table name to ingest data into sentinel
            entity_type (str): Type of the entity (host/account)
            entity_state (object): State manager object
            fields (list): list of fields
        """
        __method_name = inspect.currentframe().f_code.co_name
        try:
            self.applogger.debug(
                "{}(method={}) : {} Pull and Push entities data".format(
                    consts.LOGS_STARTS_WITH, __method_name, self.function_name
                )
            )
            posted_entities_count = 0
            page = 1
            params = {
                "page_size": consts.PAGE_SIZE,
                "ordering": "last_modified_timestamp",
                "type": entity_type,
            }

            if checkpoint_value:
                params.update({"last_modified_timestamp_gte": checkpoint_value})
            while True:
                params.update({"page": page})
                res = self.pull_data(endpoint, params=params)
                entity_response = res.get("results")
                self.applogger.debug(
                    "{}(method={}) : {} : Trying to collect information from"
                    " /entities endpoint.".format(
                        consts.LOGS_STARTS_WITH, __method_name, self.function_name
                    )
                )
                next_link = res.get("next", None)
                if len(entity_response):
                    last_modified_timestamp = entity_response[-1].get(
                        "last_modified_timestamp"
                    )
                    merged_entity_response = self.merge_assignment_details(
                        entity_response, entity_type
                    )
                    self._create_chunks_and_post_to_sentinel(
                        merged_entity_response,
                        table_name,
                        fields,
                        entity_state,
                        entities_endpoint=True,
                    )
                    posted_entities_count += len(entity_response)
                    self.applogger.info(
                        "{}(method={}) : {} : Posted Entities Count : {}".format(
                            consts.LOGS_STARTS_WITH,
                            __method_name,
                            self.function_name,
                            posted_entities_count,
                        )
                    )
                    self.save_checkpoint(
                        data=last_modified_timestamp, entity_state=entity_state, entities_endpoint=True
                    )
                if not next_link:
                    break
                page += 1
        except Exception as ex:
            self.applogger.error(
                '{}(method={}) : {} : Unexpected error while getting or posting entities data: err="{}"'.format(
                    consts.LOGS_STARTS_WITH, __method_name, self.function_name, str(ex)
                )
            )
            raise Exception(ex)

        To pull the entities data from vectra and push into sentinel.

        Args:
            endpoint (str): endpoint url
            checkpoint_value (str): Checkpoint value from checkpoint file
            table_name (str): Table name to ingest data into sentinel
            entity_type (str): Type of the entity (host/account)
            entity_state (object): State manager object
            fields (list): list of fields
        
Solutions/Vectra XDR/Data Connectors/VectraDataConnector/SharedCode/collector.py