code: def max_tokens(
      per_sentence_tokens: List[List[Tuple[str, int, int]]]
  ) -> int:
      """receive the tokenize output for a batch per_sentence_tokens,
      return the max token length of any sentence"""
  
      if len(per_sentence_tokens) == 0:
          return 0
  
      sentence_lengths = [
          len(sentence) for sentence in per_sentence_tokens
      ]
      return max(sentence_lengths)
  
imports: from typing import Any, Dict, List, Optional, Tuple
  import torch
  from pytext.torchscript.tensorizer.tensorizer import ScriptTensorizer
label_desc: Use image node_id 1 for calling a global function with example usage: max_tokens(per_sentence_tokens) and returns: max, int