code: def test_split_open(tmp_path):
      if features.check("zlib"):
          test_file = str(tmp_path / "temp.png")
      else:
          test_file = str(tmp_path / "temp.pcx")
  
      def split_open(mode):
          hopper(mode).save(test_file)
          with Image.open(test_file) as im:
              return len(im.split())
  
      assert split_open("1") == 1
      assert split_open("L") == 1
      assert split_open("P") == 1
      assert split_open("RGB") == 3
      if features.check("zlib"):
          assert split_open("RGBA") == 4
  
imports: from PIL import Image, features
  from .helper import assert_image_equal, hopper
label_desc: Use image node_id 3 for calling a global function with example usage: test_split_open(tmp_path) and returns: len