def pull_data(self, endpoint, params=None):
        """To call vectra API till retry condition is not met.

        Args:
            endpoint (str): endpoint to call in Vectra.
            params (dict, optional): params to pass to API. Defaults to None.

        Returns:
            response: response object
        """
        retry_flag = True
        retry_count = 0
        while retry_flag and retry_count <= 1:
            retry_flag, res = self.pull(url=self.base_url + endpoint, params=params)
            retry_count += 1
        if retry_count > 1 and not res:
            self.update_checkpoint_of_disabling_function()
            raise Exception("Retry limit exceeded. Hence exiting the function.")
        return res
To call vectra API till retry condition is not met.

        Args:
            endpoint (str): endpoint to call in Vectra.
            params (dict, optional): params to pass to API. Defaults to None.

        Returns:
            response: response object
        
Solutions/Vectra XDR/Data Connectors/VectraDataConnector/SharedCode/collector.py