code: def _chunk_list(
      self, arr: List[Any], chunk_size: int
  ) -> List[List[Any]]:
      out = []
      for i in range(0, len(arr), chunk_size):
          slice_item = slice(i, i + chunk_size, 1)
          out.append(arr[slice_item])
      return out
  
file_path: pytorch-lightning/src/lightning/data/streaming/sampler.py
imports: import logging
  from dataclasses import dataclass
  from typing import Any, Dict, Iterator, List, Optional, Union
  import numpy
label_desc: Use image node_id 11 for calling the CacheBatchSampler obj's underlying member method code with example usage: obj._chunk_list(arr, chunk_size) and returns: out