code: def _md5(path, blocksize=2 ** 20):
      
      m = hashlib.md5()
      with open(path, 'rb') as f:
          while True:
              buf = f.read(blocksize)
              if not buf:
                  break
              m.update(buf)
      return m.hexdigest()
docs: Compute the checksum of a file.