code: def stop(name=None, backdate=None,
           unique=None, keep_subdivisions=None, quick_print=None,
           un=None, ks=None, qp=None):
      t = timer()
      if f.t.stopped:
          raise StoppedError("Timer already stopped.")
      if backdate is None:
          t_stop = t
      else:
          if f.t is f.root:
              raise BackdateError("Cannot backdate stop of root timer.")
          if not isinstance(backdate, float):
              raise TypeError("Backdate must be type float.")
          if backdate > t:
              raise BackdateError("Cannot backdate to future time.")
          if backdate < f.t.last_t:
              raise BackdateError("Cannot backdate to time earlier than last stamp.")
          t_stop = backdate
      unique = SET['UN'] if (unique is None and un is None) else bool(unique or un)
      keep_subdivisions = SET['KS'] if (keep_subdivisions is None and ks is None) else bool(keep_subdivisions or ks)
      quick_print = SET['QP'] if (quick_print is None and qp is None) else bool(quick_print or qp)
      if name is not None:
          if f.t.paused:
              raise PausedError("Cannot stamp paused timer.")
          elapsed = t_stop - f.t.last_t
          _stamp(name, elapsed, unique, keep_subdivisions, quick_print)
      else:
          times_priv.assign_subdivisions(UNASGN, keep_subdivisions)
      for s in f.t.rgstr_stamps:
          if s not in f.s.cum:
              f.s.cum[s] = 0.
              f.s.order.append(s)
      if not f.t.paused:
          f.t.tmp_total += t_stop - f.t.start_t
      f.t.tmp_total -= f.t.self_cut
      f.t.self_cut += timer() - t
      times_priv.dump_times()
      f.t.stopped = True
      if quick_print:
          print("({}) Total: {:.4f}".format(f.t.name, f.r.total))
      return t