code: def checksum(path):
      
      hasher = hashlib.sha1()
      with open(path, 'rb') as stream:
          buf = stream.read(BLOCKSIZE)
          while len(buf) > 0:
              hasher.update(buf)
              buf = stream.read(BLOCKSIZE)
      return hasher.hexdigest()
docs: Calculcate checksum for a file.