code: def apply_chunks(
      df,
      func,
      incols,
      outcols,
      kwargs,
      pessimistic_nulls,
      chunks,
      blkct=None,
      tpb=None,
  ):
      """Chunk-wise transformation
  
      Parameters
      ----------
      {params}
      {params_chunks}
      """
      applychunks = ApplyChunksCompiler(
          func,
          incols,
          outcols,
          kwargs,
          pessimistic_nulls,
          cache_key=None,
      )
      return applychunks.run(df, chunks=chunks, tpb=tpb)
  
imports: import functools
  from typing import Any, Dict
  import cupy
  from numba import cuda
  from numba.core.utils import pysignature
  import cudf
  from cudf import _lib
  from cudf.core.buffer import acquire_spill_lock
  from cudf.core.column import column
  from cudf.utils import utils
  from cudf.utils._numba import _CUDFNumbaConfig
  from cudf.utils.docutils import docfmt_partial
label_desc: Use image node_id 2 for calling a global function with example usage: apply_chunks(df, func, incols, outcols, kwargs, pessimistic_nulls, chunks, blkct, tpb) and returns: applychunks