class_docstr: Represents the list of image sets in a pipeline run
  
      
class_docstr_tok: ["Represents","the","list","of","image","sets","in","a","pipeline","run"]
docstr: Return either the indexed image set (keys_or_number = index) or the image set with matching keys
  
          
docstr_tok: ["Return","either","the","indexed","image","set","(","keys_or_number","=","index",")","or","the","image","set","with","matching","keys"]
code: def get_image_set(self, keys_or_number):
      """Return either the indexed image set (keys_or_number = index) or the image set with matching keys"""
      if not isinstance(keys_or_number, dict):
          keys = {"number": keys_or_number}
          number = keys_or_number
          if self.__associating_by_key is None:
              self.__associating_by_key = False
          k = make_dictionary_key(keys)
      else:
          keys = keys_or_number
          k = make_dictionary_key(keys)
          if k in self.__image_sets_by_key:
              number = self.__image_sets_by_key[k].number
          else:
              number = len(self.__image_sets)
          self.__associating_by_key = True
      if number >= len(self.__image_sets):
          self.__image_sets += [None] * (
              number - len(self.__image_sets) + 1
          )
      if self.__image_sets[number] is None:
          image_set = ImageSet(number, keys, self.legacy_fields)
          self.__image_sets[number] = image_set
          self.__image_sets_by_key[k] = image_set
          if self.__associating_by_key:
              k = make_dictionary_key(dict(number=number))
              self.__image_sets_by_key[k] = image_set
      else:
          image_set = self.__image_sets[number]
      return image_set
  
file_path: CellProfiler/src/subpackages/core/cellprofiler_core/image/_image_set_list.py
imports: import io
  import pickle
  from ._image_set import ImageSet
  from ..utilities.image import make_dictionary_key
label_desc: Use image node_id 5 for calling the ImageSetList obj's underlying member method code with example usage: obj.get_image_set(keys_or_number) and returns: image_set