docstr: Adds an entry to the token usage dictionaries for the given checkpoint number.
  
  Assumes that the token usage dictionaries for steps are filled.
docstr_tok: ["Adds","an","entry","to","the","token","usage","dictionaries","for","the","given","checkpoint","number",".","Assumes","that","the","token","usage","dictionaries","for","steps","are","filled","."]
code: def _add_checkpoint_entry_for_used_tokens(
      self, checkpoint_number: int
  ):
      """Adds an entry to the token usage dictionaries for the given checkpoint number.
  
      Assumes that the token usage dictionaries for steps are filled.
      """
      self.cumulative_checkpoint_token_usage[
          str(checkpoint_number)
      ] = self.total_tokens_used
  
      if checkpoint_number <= 0:
          raise ValueError(
              "Checkpoint number should be greater than 0."
          )
  
      if checkpoint_number == 1:
          # The incremental token usage for checkpoint 0 is the same as the total tokens used so far.
          self.incremental_checkpoint_token_usage[
              str(checkpoint_number)
          ] = self.total_tokens_used
      else:
          # The incremental token usage for this checkpoint is the total tokens used minus the cumulative tokens used
          # up to the previous checkpoint.
          previous_checkpoint_number = checkpoint_number - 1
  
          tokens_used_since_previous_checkpoint = (
              self.total_tokens_used
              - self.cumulative_checkpoint_token_usage[
                  str(previous_checkpoint_number)
              ]
          )
          self.incremental_checkpoint_token_usage[
              str(checkpoint_number)
          ] = tokens_used_since_previous_checkpoint
  
imports: import logging
  from collections import defaultdict
  from typing import Dict, List, Tuple, TYPE_CHECKING
  from ludwig.api_annotations import DeveloperAPI
  from ludwig.constants import AUTO, COMBINED, LOSS
  from ludwig.models.base import BaseModel
  from ludwig.modules.metric_modules import get_best_function
  from ludwig.utils.data_utils import save_json
  from ludwig.utils.metric_utils import TrainerMetric
label_desc: Use image node_id 5 for calling the ProgressTracker obj's underlying member method code with example usage: obj._add_checkpoint_entry_for_used_tokens(checkpoint_number) without return types