def unzip(zipped_file, output_directory=None,<EOL>prefix="<STR_LIT>", suffix="<STR_LIT>"):
if not output_directory:<EOL><INDENT>try:<EOL><INDENT>output_directory = mkdtemp(suffix=suffix,<EOL>prefix=prefix)<EOL><DEDENT>except Exception as e:<EOL><INDENT>try:<EOL><INDENT>os.removedirs(output_directory)<EOL><DEDENT>except TypeError:<EOL><INDENT>pass<EOL><DEDENT>raise e<EOL><DEDENT><DEDENT>return _do_unzip(zipped_file, output_directory)<EOL>
Uncompress a zipped file from given filepath to an (optional) location.

    If no location is given, a temporary folder will be generated inside
    CFG_TMPDIR, prefixed with "apsharvest_unzip_".