code: def write_offsource(page, args, grbtag, onsource=False):
  
      
  
      th = ['Re-weighted SNR', 'Coherent SNR']
  
      if args.time_slides:
          if onsource:
              out_dir = 'ZEROLAG_ALL'
          else:
              out_dir = 'ZEROLAG_OFF'
      else:
          if onsource:
              out_dir = 'ALL_TIMES'
          else:
              out_dir = 'OFFSOURCE'
  
      plot = markup.page()
      p = "%s/plots_clustered/GRB%s_bestnr_vs_time_noinj.png" % (out_dir, grbtag)
      plot.a(href=p, title="Detection statistic versus time")
      plot.img(src=p)
      plot.a.close()
      td = [ plot() ]
  
      plot = markup.page()
      p = "%s/plots_clustered/GRB%s_triggers_vs_time_noinj.png" % (out_dir, grbtag)
      plot.a(href=p, title="Coherent SNR versus time")
      plot.img(src=p)
      plot.a.close()
      td.append(plot())
  
      ifos = [args.ifo_tag[i:i+2] for i in range(0, len(args.ifo_tag), 2)]
      for ifo in ifos:
          th.append('%s SNR' % ifo)
          plot = markup.page()
          p = "%s/plots_clustered/GRB%s_%s_triggers_vs_time_noinj.png"\
              % (out_dir, grbtag, ifo)
          plot.a(href=p, title="%s SNR versus time" % ifo)
          plot.img(src=p)
          plot.a.close()
          td.append(plot())
  
      page = write_table(page, th, td)
  
      return page
docs: Write offsource SNR versus time plots to markup.page object page