code: def _is_batch_full(batch, num_tokens, max_tokens, max_sentences):
      if len(batch) == 0:
          return 0
      if len(batch) == max_sentences:
          return 1
      if num_tokens > max_tokens:
          return 1
      return 0
  
file_path: PaddleHub/modules/audio/svs/diffsinger/utils/__init__.py
imports: import sys
  import time
  import types
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: _is_batch_full(batch, num_tokens, max_tokens, max_sentences) and returns: int, int, int, int