code: def _md5_sum_file(path):
      
      with Path(path).open('rb') as fhandle:
          md5sum = hashlib.md5()
          while True:
              data = fhandle.read(8192)
              if not data:
                  break
              md5sum.update(data)
      return md5sum.hexdigest()
docs: Calculates the MD5 sum of a file.