code: def test_add_image_set_by_key(self):
      x = cellprofiler_core.image.ImageSetList()
      key = {"key": "value"}
      y = x.get_image_set(key)
      assert x.count() == 1, "# of elements was %d, should be 1" % (
          x.count()
      )
      assert y.number == 0, (
          "The image set should be #0, was %d" % y.number
      )
      assert y == x.get_image_set(
          0
      ), "The image set should be retrievable by index"
      assert y == x.get_image_set(
          key
      ), "The image set should be retrievable by key"
      assert repr(key) == repr(y.keys)
  
file_path: CellProfiler/tests/core/image/test_image_set_list.py
imports: import numpy
  import cellprofiler_core.image
  import cellprofiler_core.image.abstract_image._callback_image
label_desc: Use image node_id 3 for calling the TestImageSetList obj's underlying member method code with example usage: obj.test_add_image_set_by_key() without return types