code: def test_index_pixel_set():
      with Image(filename="rose:") as img:
          with Color("black") as dot:
              img[0, 0] = dot
              assert img[0, 0] == dot
              img[0, 0] = "black"
              assert img[0, 0] == dot
          img.colorspace = "gray"
          with Color("gray50") as dot:
              img[0, 0] = dot
              assert img[0, 0] == dot
          img.colorspace = "cmyk"
          with Color("cmyk(255, 0, 0, 0") as dot:
              img[0, 0] = dot
              assert img[0, 0] == dot
          with raises(TypeError):
              img[0, 0] = 1
          with raises(TypeError):
              img[0xDEADBEEF] = Color("black")
          with raises(ValueError):
              img[1, 2, 3] = Color("black")
          with raises(TypeError):
              img[0.5, "d"] = Color("black")
  
imports: import codecs
  import io
  import os
  import os.path
  import shutil
  import struct
  import sys
  import tempfile
  from pytest import mark, raises
  from wand.image import ClosedImageError, Image
  from wand.color import Color
  from wand.font import Font
label_desc: Use image node_id 37 for calling a global function with example usage: test_index_pixel_set() without return types