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 a string that can be used to load the image_set_list's state
  
  load_state will restore the image set list's state. No image_set can
  have image providers before this call.
docstr_tok: ["Return","a","string","that","can","be","used","to","load","the","image_set_list","'s","state","load_state","will","restore","the","image","set","list","'s","state",".","No","image_set","can","have","image","providers","before","this","call","."]
code: def save_state(self):
      """Return a string that can be used to load the image_set_list's state
  
      load_state will restore the image set list's state. No image_set can
      have image providers before this call.
      """
      f = io.BytesIO()
      pickle.dump(self.count(), f)
      for i in range(self.count()):
          image_set = self.get_image_set(i)
          assert isinstance(image_set, ImageSet)
          assert (
              len(image_set.providers) == 0
          ), "An image set cannot have providers while saving its state"
          pickle.dump(image_set.keys, f)
      pickle.dump(self.legacy_fields, f)
      return f.getvalue()
  
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 8 for calling the ImageSetList obj's underlying member method code with example usage: obj.save_state() and returns: f