code: def to_xxx_colorsys(im, func, mode):
      # convert the hard way using the library colorsys routines.
  
      (r, g, b) = im.split()
  
      conv_func = int_to_float
  
      converted = [
          tuple_to_ints(
              func(conv_func(_r), conv_func(_g), conv_func(_b))
          )
          for (_r, _g, _b) in itertools.zip_longest(
              r.tobytes(), g.tobytes(), b.tobytes()
          )
      ]
  
      new_bytes = b"".join(
          bytes(chr(h) + chr(s) + chr(v), "latin-1")
          for (h, s, v) in converted
      )
  
      hsv = Image.frombytes(mode, r.size, new_bytes)
  
      return hsv
  
file_path: pillow/Tests/test_format_hsv.py
imports: from __future__ import annotations
  import colorsys
  import itertools
  from PIL import Image
  from .helper import assert_image_similar, hopper
label_desc: Use image node_id 6 for calling a global function with example usage: to_xxx_colorsys(im, func, mode) and returns: hsv