code: def _check_ellipsis(index):
      """Process indices with Ellipsis. Returns modified index."""
      if index is Ellipsis:
          return (slice(None), slice(None))
  
      if not isinstance(index, tuple):
          return index
  
      # Find any Ellipsis objects.
      ellipsis_indices = [
          i for i, v in enumerate(index) if v is Ellipsis
      ]
      if not ellipsis_indices:
          return index
      if len(ellipsis_indices) > 1:
          raise IndexError(
              "an index can only have a single ellipsis ('...')"
          )
  
      # Replace the Ellipsis object with 0, 1, or 2 null-slices as needed.
      (i,) = ellipsis_indices
      num_slices = max(0, 3 - len(index))
      return index[:i] + (slice(None),) * num_slices + index[i + 1 :]
  
imports: import numpy
  from ._sputils import isintlike
label_desc: Use image node_id 3 for calling a global function with example usage: _check_ellipsis(index) and returns: unknown, slice,  slice, index, index