code: def read_last_checkpoint(self):
          
          # In versions of mongo-connector 2.3 and before,
          # we used the repr of the
          # oplog collection as keys in the oplog_progress dictionary.
          # In versions thereafter, we use the replica set name. For backwards
          # compatibility, we check for both.
          oplog_str = str(self.oplog)
  
          ret_val = None
          with self.oplog_progress as oplog_prog:
              oplog_dict = oplog_prog.get_dict()
              try:
                  # New format.
                  ret_val = oplog_dict[self.replset_name]
              except KeyError:
                  try:
                      # Old format.
                      ret_val = oplog_dict[oplog_str]
                  except KeyError:
                      pass
  
          LOG.debug("OplogThread: reading last checkpoint as %s " % str(ret_val))
          self.checkpoint = ret_val
          return ret_val
docs: Read the last checkpoint from the oplog progress dictionary.