code: def _filehash(filepath, blocksize=4096):
      
      sha = hashlib.sha256()
      with open(filepath, 'rb') as fp:
          while 1:
              data = fp.read(blocksize)
              if data:
                  sha.update(data)
              else:
                  break
      return sha
docs: Return the hash object for the file `filepath', processing the file
      by chunk of `blocksize'.
  
      :type filepath: str
      :param filepath: Path to file
  
      :type blocksize: int
      :param blocksize: Size of the chunk when processing the file