<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def file_md5( filename ):
 """ Generate the md5 checksum for a file Args: filename (Str):
 The file to be checksummed. Returns: (Str):
 The hex checksum Notes: If the file is gzipped, the md5 checksum returned is for the uncompressed ASCII file. """

    with zopen( filename, 'r' ) as f:
        file_string = f.read()
    try: # attempt to decode byte object
        file_string = file_string.decode()
    except AttributeError:
        pass
    return( md5sum( file_string ) )