class_docstr: Test for pil utils.
code: def test_from_pil(self):
      pil_img = PILImage.open(logo_path)
      towhee_img = from_pil(pil_img)
  
      self.assertIsInstance(towhee_img, Image)
  
      self.assertEqual(pil_img.height, towhee_img.shape[0])
      self.assertEqual(pil_img.width, towhee_img.shape[1])
      self.assertEqual(len(pil_img.split()), towhee_img.shape[2])
      self.assertEqual(pil_img.mode, towhee_img.mode)
      self.assertTrue((np.array(pil_img) == towhee_img).all())
  
      pil_img2 = to_pil(towhee_img)
  
      self.assertIsInstance(pil_img2, PILImage.Image)
  
      self.assertEqual(pil_img2.height, towhee_img.shape[0])
      self.assertEqual(pil_img2.width, towhee_img.shape[1])
      self.assertEqual(len(pil_img2.split()), towhee_img.shape[2])
      self.assertEqual(pil_img2.mode, towhee_img.mode)
      self.assertTrue((np.array(pil_img2) == towhee_img).all())
  
file_path: towhee/tests/unittests/types/test_image_utils.py
imports: import os
  import unittest
  import numpy
  from pathlib import Path
  from towhee.types import Image
  from towhee.utils.pil_utils import PILImage
  from towhee.types.image_utils import from_pil, to_pil
label_desc: Use image node_id 1 for calling the TestPilUtils obj's underlying member method code with example usage: obj.test_from_pil() without return types