code: def do_set_current_image(self):
      if self.current_latent is None:
          return
  
      import modules.sd_samplers
  
      try:
          if shared.opts.show_progress_grid:
              self.assign_current_image(
                  modules.sd_samplers.samples_to_image_grid(
                      self.current_latent
                  )
              )
          else:
              self.assign_current_image(
                  modules.sd_samplers.sample_to_image(
                      self.current_latent
                  )
              )
  
          self.current_image_sampling_step = self.sampling_step
  
      except Exception:
          # when switching models during genration, VAE would be on CPU, so creating an image will fail.
          # we silently ignore this error
          errors.record_exception()
  
imports: import datetime
  import logging
  import threading
  import time
  from modules import errors, shared, devices
  from typing import Optional
label_desc: Use image node_id 15 for calling the State obj's underlying member method code with example usage: obj.do_set_current_image() without return types