class_docstr: Information to be passed and used for a batch of inputs during
  a single model forward
code: def total_token_num(self):
      # return self.batch_size * self.max_len_in_batch
      assert self.seq_len is not None and self.seq_len.size(0) > 0
      return int(torch.sum(self.seq_len))
  
file_path: ColossalAI/colossalai/inference/kv_cache/batch_infer_state.py
imports: from dataclasses import dataclass
  import torch
  from transformers.tokenization_utils_base import BatchEncoding
  from .kvcache_manager import MemoryManager
label_desc: Use image node_id 1 for calling the BatchInferState obj's underlying member method code with example usage: obj.total_token_num() and returns: int