code: def chunks(lst: list, n: int) -> list:
      """Yield successive n-sized chunks from lst."""
      all_ = []
      for i in range(0, len(lst), n):
          data_index = lst[i : i + n]
          all_.append(data_index)
      counter = 0
      for i in all_:
          counter += len(i)
      assert counter == len(lst)
  
      return all_
  
imports: import copy
  import re
  import warnings
  from typing import Optional, Tuple, Union
  import torch
  from torch import Tensor
  from mmdet.registry import MODELS
  from mmdet.structures import SampleList
  from mmdet.utils import ConfigType, OptConfigType, OptMultiConfig
  from .single_stage import SingleStageDetector
label_desc: Use image node_id 7 for calling a global function with example usage: chunks(lst, n) and returns: all_