code: def snapshot(gta, plotter, key, do_weighted=True, make_plots=True):
      
      gta.write_roi(key, save_model_map=True, make_plots=make_plots, save_weight_map=do_weighted)
      if make_plots:
          o = gta.residmap(key)
          plotter.make_residmap_plots(o, gta.roi)
  
          if do_weighted:
              gta.make_plots("%s_wt"%key, weighted=True)
              o = gta.residmap("%s_wt"%key, use_weights=True)
              plotter.make_residmap_plots(o, gta.roi)
docs: Take a snapshot of the ROI
  
      Parameters
      ----------
  
      gta : `fermipy.GTAnalysis`
          The analysis object
  
      plotter : `fermipy.plotting.AnalysisPlotter`
          The object that makes the plots
  
      key : str
          Key for this snapshot, used to create filenames
  
      do_weighted : bool
          If True, include weighted version of outputs
  
      make_plots : bool
          If True, make plots