def writer(path):
    """
    Creates a compressed file writer from for a path with a specified
    compression type.
    """
    filename, extension = extract_extension(path)
    if extension in FILE_WRITERS:
        writer_func = FILE_WRITERS[extension]
        return writer_func(path)
    else:
        raise RuntimeError("Output compression {0} not supported.  Type {1}"
                           .format(extension, tuple(FILE_WRITERS.keys())))
def writer ( path ) : filename , extension = extract_extension ( path ) if extension in FILE_WRITERS : writer_func = FILE_WRITERS [ extension ] return writer_func ( path ) else : raise RuntimeError ( "Output compression {0} not supported.  Type {1}" . format ( extension , tuple ( FILE_WRITERS . keys ( ) ) ) )
Creates a compressed file writer from for a path with a specified
    compression type.