def get_file_handle(file_path):
if file_path.endswith('<STR_LIT>'):<EOL><INDENT>file_handle = getreader('<STR_LIT:utf-8>')(gzip.open(file_path, '<STR_LIT:r>'), errors='<STR_LIT:replace>')<EOL><DEDENT>else:<EOL><INDENT>file_handle = open(file_path, '<STR_LIT:r>', encoding='<STR_LIT:utf-8>')<EOL><DEDENT>return file_handle<EOL>
Return a opened file