code: def test_write_to_bytes_imwrite():
      image = (np.random.rand(600, 800, 3) * 255).astype(np.uint8)
  
      # writing to bytes with pillow
      with io.BytesIO() as output:
          Image.fromarray(image).save(output, format="PNG")
          contents = output.getvalue()
  
      # write with ImageIO
      bytes_string = iio.imwrite(
          "<bytes>", image, plugin="pillow", extension=".png"
      )
  
      assert contents == bytes_string
  
imports: import io
  import os
  from pathlib import Path
  import imageio.v3
  import numpy
  import pytest
  from imageio.core.request import InitializationError, Request
  from imageio.core.v3_plugin_api import PluginV3
  from imageio.plugins.pillow import PillowPlugin
  from PIL import Image, ImageSequence, ImageOps, __version__
label_desc: Use image node_id 26 for calling a global function with example usage: test_write_to_bytes_imwrite() without return types