code: def validate_batch_element(
      e: Tuple[
          Optional[List[str]],  # texts
          Optional[List[List[str]]],  # multi_texts
          Optional[List[List[str]]],  # tokens
          Optional[List[str]],  # languages
          Optional[List[List[float]]],  # dense_feat must be None
      ]
  ):
      bad = False
  
      if len(e[0]) > 0:
          if (len(e[1]) > 0) or (len(e[2]) > 0):
              bad = True
          if (e[4] is not None) and (len(e[4]) != len(e[0])):
              bad = True
  
      if len(e[1]) > 0:
          raise RuntimeError("multi_texts not supported for batching")
  
      if len(e[2]) > 0:
          if (len(e[0]) > 0) or (len(e[1]) > 0):
              bad = True
          if (e[4] is not None) and (len(e[4]) != len(e[2])):
              bad = True
  
      if bad:
          raise RuntimeError("Malformed request")
  
imports: from typing import Any, Dict, List, Optional, Tuple
  import torch
  from pytext.torchscript.tensorizer.tensorizer import ScriptTensorizer
label_desc: Use image node_id 19 for calling a global function with example usage: validate_batch_element(e) without return types