def extract(fn, dest_dir=None, components=None):
    if dest_dir:
        if (not _os.path.isabs(dest_dir)):
            dest_dir = _os.path.normpath(_os.path.join(_os.getcwd(), dest_dir))
        if (not _os.path.isdir(dest_dir)):
            _os.makedirs(dest_dir)
    else:
        dest_dir = get_default_extracted_folder(fn)
    for ext in SUPPORTED_EXTENSIONS:
        if fn.endswith(ext):
            SUPPORTED_EXTENSIONS[ext].extract(fn, dest_dir, components=components)
            break
    else:
        raise ValueError("Didn't recognize extension for file '{}'.  Supported extensions are: {}".format(fn, list(SUPPORTED_EXTENSIONS.keys())))
def extract(fn, dest_dir=None, components=None):
    if dest_dir:
        if (not _os.path.isabs(dest_dir)):
            dest_dir = _os.path.normpath(_os.path.join(_os.getcwd(), dest_dir))
        if (not _os.path.isdir(dest_dir)):
            _os.makedirs(dest_dir)
    else:
        dest_dir = get_default_extracted_folder(fn)
    for ext in SUPPORTED_EXTENSIONS:
        if fn.endswith(ext):
            SUPPORTED_EXTENSIONS[ext].extract(fn, dest_dir, components=components)
            break
    else:
        raise ValueError("Didn't recognize extension for file '{}'.  Supported extensions are: {}".format(fn, list(SUPPORTED_EXTENSIONS.keys())))