class_docstr: Function that slices array and extract elements.
class_docstr_tok: ["Function","that","slices","array","and","extract","elements","."]
code: def __init__(self, slices):
      if isinstance(slices, list):
          if all([isinstance(s, int) for s in slices]):
              slices = (slices,)
          slices = tuple(slices)
      elif not isinstance(slices, tuple):
          slices = (slices,)
  
      if chainer.is_debug():
          n_ellipses = 0
          for s in slices:
              if s is Ellipsis:
                  n_ellipses += 1
          if n_ellipses > 1:
              raise ValueError("Only one Ellipsis is allowed")
  
      self.slices = slices
  
imports: import numpy
  import chainer
  from chainer import backend
  from chainer import function_node
  from chainer import utils
  from chainer.utils import type_check
  from chainer import variable
  import chainerx
label_desc: Use image node_id 1 to create a new GetItem object from inherited base classes: function_node with example: obj = GetItem(slices)