#NEWLINE# def read_footer( filename ) : #NEWLINE# #INDENT# 'Reads and returns the FileMetaData object for the given file.' #NEWLINE# with open ( filename , 'rb' ) as fo : #NEWLINE# #INDENT# if ( ( not _check_header_magic_bytes ( fo ) ) or ( not _check_footer_magic_bytes ( fo ) ) ) : #NEWLINE# #INDENT# raise ParquetFormatException ( '{0} is not a valid parquet file (missing magic bytes)' . format ( fo ) ) #NEWLINE# #UNINDENT# return _read_footer ( fo )