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
  
file_path: chainer/chainer/functions/array/scatter_add.py
imports: import numpy
  import chainer
  from chainer import backend
  from chainer.backends import cuda
  from chainer import function_node
  from chainer.utils import type_check
  import chainerx
label_desc: Use image node_id 1 to create a new ScatterAdd object from inherited base classes: function_node with example: obj = ScatterAdd(slices)