class_docstr: Object that manages all the data related to the computation
  except the actual within-bucket matching and the organization of the
  computation (parallel or not)
class_docstr_tok: ["Object","that","manages","all","the","data","related","to","the","computation","except","the","actual","within-bucket","matching","and","the","organization","of","the","computation","(","parallel","or","not",")"]
code: def write_checkpoint(self, fname, completed):
      # write to temp file then move to final file
      tmpname = fname + ".tmp"
      with open(tmpname, "wb") as f:
          pickle.dump(
              {
                  "sizes": self.sizes_in_checkpoint(),
                  "completed": completed,
                  "rh": (self.rh.D, self.rh.I),
              },
              f,
              -1,
          )
      os.replace(tmpname, fname)
  
imports: import time
  import pickle
  import os
  import logging
  from multiprocessing.pool import ThreadPool
  import threading
  import _thread
  from queue import Queue
  import traceback
  import datetime
  import numpy
  import faiss
  from faiss.contrib.inspect_tools import get_invlist
label_desc: Use image node_id 12 for calling the BigBatchSearcher obj's underlying member method code with example usage: obj.write_checkpoint(fname, completed) without return types