code: def close(self):
          
          fname = os.path.basename(self._path)
          checksum_persister = _get_checksum_persister(self._path)
          with contextlib.closing(checksum_persister):
              checksum_persister[fname] = self._hasher.hexdigest()
  
          self._close()
docs: Persist a checksum and close the file.