class_docstr: Test DataTransforms for images
class_docstr_tok: ["Test","DataTransforms","for","images"]
code: def test_convert2gray(self):
      # Check convert2gray
      dt = DataTransforms(self.d)
      gray = dt.convert2gray()
      check_gray = np.dot(self.d[..., :3], [0.2989, 0.5870, 0.1140])
      assert np.allclose(check_gray, gray)
  
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 5 for calling the TestDataTransforms obj's underlying member method code with example usage: obj.test_convert2gray() without return types