code: def is_fresh(self):  # type: () -> bool
          
          lock = self._lock.read()
          metadata = lock.get("metadata", {})
  
          if "content-hash" in metadata:
              return self._content_hash == lock["metadata"]["content-hash"]
  
          return False
docs: Checks whether the lock file is still up to date with the current hash.