code: def set_spacing(self, new_spacing):
          
          if not isinstance(new_spacing, (tuple, list)):
              raise ValueError('arg must be tuple or list')
          if len(new_spacing) != self.dimension:
              raise ValueError('must give a spacing value for each dimension (%i)' % self.dimension)
  
          libfn = utils.get_lib_fn('setSpacing%s'%self._libsuffix)
          libfn(self.pointer, new_spacing)
docs: Set image spacing
  
          Arguments
          ---------
          new_spacing : tuple or list
              updated spacing for the image.
              should have one value for each dimension
  
          Returns
          -------
          None