code: def validate_checksum( filename, md5sum ):
      
      filename = match_filename( filename )
      md5_hash = file_md5( filename=filename )
      if md5_hash != md5sum:
          raise ValueError('md5 checksums are inconsistent: {}'.format( filename ))
docs: Compares the md5 checksum of a file with an expected value.
      If the calculated and expected checksum values are not equal, 
      ValueError is raised.
      If the filename `foo` is not found, will try to read a gzipped file named
      `foo.gz`. In this case, the checksum is calculated for the unzipped file.
  
      Args:
          filename (str): Path for the file to be checksummed.
          md5sum (str):  The expected hex checksum.
  
      Returns:
          None