code: def md5sum(filen):
      '''Calculate the md5sum of a file.
      '''
      with open(filen, 'rb') as fileh:
          md5 = hashlib.md5(fileh.read())
  
      return md5.hexdigest(f md5sum(filen):
      '''Calculate the md5sum of a file.
      '''
      with open(filen, 'rb') as fileh:
          md5 = hashlib.md5(fileh.read())
  
      return md5.hexdigest()
docs: Calculate the md5sum of a file.