If a progress function was supplied, this will call that function with
        the total number of elements, and the remaining number of elements.

        :param total: The total number of elements.
        :param remaining: The remaining number of elements.

def publish_progress(self, total, current):
        """
        If a progress function was supplied, this will call that function with
        the total number of elements, and the remaining number of elements.

        :param total: The total number of elements.
        :param remaining: The remaining number of elements.
        """
        if self.progress_callback:
            self.progress_callback(total, current)