code: def test_rotate_pil(self):
      img = np.random.uniform(0, 256, size=self.size).astype(np.float32)
      angle = random.uniform(-180, 180)
  
      with chainer.using_config("cv_rotate_backend", "PIL"):
          out = rotate(
              img,
              angle,
              fill=self.fill,
              interpolation=self.interpolation,
          )
      expected = flip(img, x_flip=True)
      with chainer.using_config("cv_rotate_backend", "PIL"):
          expected = rotate(
              expected,
              -1 * angle,
              fill=self.fill,
              interpolation=self.interpolation,
          )
      expected = flip(expected, x_flip=True)
  
      if self.interpolation == PIL.Image.NEAREST:
          assert np.mean(out == expected) > 0.99
      else:
          np.testing.assert_almost_equal(out, expected, decimal=3)
  
file_path: chainercv/tests/transforms_tests/image_tests/test_rotate.py
imports: import PIL
  import random
  import unittest
  import numpy
  import chainer
  from chainer import testing
  from chainercv.transforms import flip
  from chainercv.transforms import rotate
label_desc: Use image node_id 1 for calling the TestRotate obj's underlying member method code with example usage: obj.test_rotate_pil() without return types