class_docstr: Test DataTransforms for images
class_docstr_tok: ["Test","DataTransforms","for","images"]
code: def test_shift(self):
      # Check shift
      dt = DataTransforms(self.d)
      height = 5
      width = 5
      if len(self.d.shape) == 2:
          shift = scipy.ndimage.shift(self.d, [height, width])
      if len(self.d.shape) == 3:
          shift = scipy.ndimage.shift(self.d, [height, width, 0])
      check_shift = dt.shift(width, height)
      assert np.allclose(shift, check_shift)
  
imports: import os
  import unittest
  import numpy
  import pytest
  import scipy.ndimage
  import deepchem
  from deepchem.trans.transformers import DataTransforms
label_desc: Use image node_id 9 for calling the TestDataTransforms obj's underlying member method code with example usage: obj.test_shift() without return types