code: def _split_chunks(n: int, p: int) -> List[int]:
      """
      Private function to calculate chunk sizes for tf.split(). An array/tensor of length n is aimed to be split into p
      number of chunks of roughly equivalent size.
  
      Parameters
      ----------
      n
          Size of array/tensor to be split.
      p
          Number of chunks.
  
      Returns
      -------
      List containing the size of each chunk.
      """
      if p >= n:
          chunks = [n]
      else:
          chunks = [n // p + 1] * (n % p) + [n // p] * (p - n % p)
      return chunks
  
file_path: alibi-detect/alibi_detect/cd/tensorflow/context_aware.py
imports: import logging
  import numpy
  import tensorflow
  import tensorflow_probability
  from typing import Callable, Dict, Optional, Tuple, Union, List
  from alibi_detect.cd.base import BaseContextMMDDrift
  from alibi_detect.utils.tensorflow.kernels import GaussianRBF
  from alibi_detect.utils.warnings import deprecated_alias
  from alibi_detect.utils.frameworks import Framework
  from alibi_detect.cd._domain_clf import _SVCDomainClf
  from tqdm import tqdm
label_desc: Use image node_id 1 for calling a global function with example usage: _split_chunks(n, p) and returns: chunks