code: def _batch(a_list: list, n_batches: int):
      batch_size = len(a_list) // n_batches + int(
          len(a_list) % n_batches > 0
      )
      for i in range(0, len(a_list), batch_size):
          yield a_list[i : min(i + batch_size, len(a_list))]
  
file_path: vizseq/vizseq/scorers/_cider/__init__.py
imports: from typing import List, Dict, Tuple
  from collections import defaultdict
  import math
  from concurrent.futures import ProcessPoolExecutor, as_completed
  import numpy
  from tqdm import tqdm
label_desc: Use image node_id 1 for calling a global function with example usage: _batch(a_list, n_batches) without return types