code: def _infer_pad_shape(nested_lists):
      """Return the minimal tensor shape which could contain the input data."""
      yield len(nested_lists)
      while nested_lists and all(should_iter(i) for i in nested_lists):
          # pad shape to be multiple of 8 when fp16 enabled
          yield precision.pad_length(
              max(len(nested) for nested in nested_lists)
          )
          nested_lists = list(
              itertools.chain.from_iterable(nested_lists)
          )
  
imports: import itertools
  from collections import Counter
  from typing import Dict, List, Optional, Tuple
  import torch
  from pytext.common.constants import SpecialTokens, Token
  from pytext.utils import cuda, precision
label_desc: Use image node_id 2 for calling a global function with example usage: _infer_pad_shape(nested_lists) without return types