code: def _check_nsplits(self, tiled: TileableType):
      if tiled.nsplits is None or (
          tiled.nsplits == () and len(tiled.chunks) == 1
      ):
          return
  
      nsplit_chunk_shape = tuple(len(s) for s in tiled.nsplits)
      if nsplit_chunk_shape != tiled.chunk_shape:
          raise AssertionError(
              "Operand %r: shape of nsplits %r not consistent with chunk shape %r"
              % (tiled.op, nsplit_chunk_shape, tiled.chunk_shape)
          ) from None
  
      nsplit_shape = tuple(np.sum(s) for s in tiled.nsplits)
      try:
          self.assert_shape_consistent(nsplit_shape, tiled.shape)
      except AssertionError:
          raise AssertionError(
              "Operand %r: shape computed from nsplits %r -> %r not consistent with real shape %r"
              % (tiled.op, tiled.nsplits, nsplit_shape, tiled.shape)
          ) from None
  
      for c in tiled.chunks:
          try:
              tiled_c = tiled.cix[c.index]
          except ValueError as ex:
              raise AssertionError(
                  "Operand %r: Malformed index %r, nsplits is %r. Raw error is %r"
                  % (c.op, c.index, tiled.nsplits, ex)
              ) from None
  
          if tiled_c is not c:
              raise AssertionError(
                  "Operand %r: Cannot spot chunk via index %r, nsplits is %r"
                  % (c.op, c.index, tiled.nsplits)
              )
      for cid, shape in enumerate(itertools.product(*tiled.nsplits)):
          chunk_shape = (
              self._raw_chunk_shapes.get(tiled.chunks[cid].key)
              or tiled.chunks[cid].shape
          )
          if len(shape) != len(chunk_shape):
              raise AssertionError(
                  "Operand %r: Shape in nsplits %r does not meet shape in chunk %r"
                  % (tiled.chunks[cid].op, shape, chunk_shape)
              )
          for s1, s2 in zip(shape, chunk_shape):
              if (not (np.isnan(s1) and np.isnan(s2))) and s1 != s2:
                  raise AssertionError(
                      "Operand %r: Shape in nsplits %r does not meet shape in chunk %r"
                      % (tiled.chunks[cid].op, shape, chunk_shape)
                  )
  
imports: import itertools
  from collections import defaultdict
  from functools import partial
  from typing import Callable, Dict, List
  import numpy
  from .....core import TileableType, ChunkGraph, OBJECT_TYPE, enter_mode, register, unregister
  from .....core.operand import Fetch, ShuffleProxy
  from .....core.operand.shuffle import ShuffleFetchType
  from .....resource import Resource
  from .....tests.core import _check_args, ObjectCheckMixin
  from .....typing import BandType, ChunkType
  from ....subtask import Subtask, SubtaskGraph
  from ...analyzer import GraphAnalyzer
  from ..preprocessor import CancellableTiler, TaskPreprocessor
label_desc: Use image node_id 4 for calling the CheckedTaskPreprocessor obj's underlying member method code with example usage: obj._check_nsplits(tiled) without return types