code: def test_roundtrip():
      def getdata(mode):
          im = hopper(mode).resize((32, 30), Image.Resampling.NEAREST)
          data = im.getdata()
          return data[0], len(data), len(list(data))
  
      assert getdata("1") == (0, 960, 960)
      assert getdata("L") == (17, 960, 960)
      assert getdata("I") == (17, 960, 960)
      assert getdata("F") == (17.0, 960, 960)
      assert getdata("RGB") == ((11, 13, 52), 960, 960)
      assert getdata("RGBA") == ((11, 13, 52, 255), 960, 960)
      assert getdata("CMYK") == ((244, 242, 203, 0), 960, 960)
      assert getdata("YCbCr") == ((16, 147, 123), 960, 960)
  
imports: from __future__ import annotations
  from PIL import Image
  from .helper import hopper
label_desc: Use image node_id 2 for calling a global function with example usage: test_roundtrip() and returns: data,  len,  len