class_docstr: Test DataTransforms for images
class_docstr_tok: ["Test","DataTransforms","for","images"]
code: def test_median_filter(self):
      # Check median filter
      from PIL import Image, ImageFilter
  
      dt = DataTransforms(self.d)
      filtered = dt.median_filter(size=3)
      image = Image.fromarray(self.d)
      image = image.filter(ImageFilter.MedianFilter(size=3))
      check_filtered = np.array(image)
      assert np.allclose(check_filtered, filtered)
  
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 12 for calling the TestDataTransforms obj's underlying member method code with example usage: obj.test_median_filter() without return types