def METHOD_NAME(gdk_pixbuf_query_loaders, libdir, loader_libs):
    # Run the "gdk-pixbuf-query-loaders" command and capture its standard output providing an updated loader
    # cache; then write this output to the loader cache bundled with this frozen application. On all platforms,
    # we also move the package structure to point to lib/gdk-pixbuf instead of lib/gdk-pixbuf-2.0/2.10.0 in
    # order to make compatible for OSX application signing.
    #
    # On Mac OS we use @executable_path to specify a path relative to the generated bundle. However, on
    # non-Windows, we need to rewrite the loader cache because it is not relocatable by default. See
    # https://bugzilla.gnome.org/show_bug.cgi?id=737523
    #
    # To make it easier to rewrite, we just always write @executable_path, since its significantly easier to
    # find/replace at runtime. :)
    #
    # To permit string munging, decode the encoded bytes output by this command (i.e., enable the
    # "universal_newlines" option).
    #
    # On Fedora, the default loaders cache is /usr/lib64, but the libdir is actually /lib64. To get around this,
    # we pass the path to the loader command, and it will create a cache with the right path.
    #
    # On Windows, the loaders lib directory is relative, starts with 'lib', and uses \\ as path separators
    # (escaped \).
    cachedata = compat.exec_command_stdout(gdk_pixbuf_query_loaders, *loader_libs)
    output_lines = []
    prefix = '"' + os.path.join(libdir, 'gdk-pixbuf-2.0', '2.10.0')
    plen = len(prefix)
    win_prefix = '"' + '\\\\'.join(['lib', 'gdk-pixbuf-2.0', '2.10.0'])
    win_plen = len(win_prefix)
    msys2_prefix = '"' + os.path.abspath(os.path.join(libdir, '..', 'lib', 'gdk-pixbuf-2.0', '2.10.0'))
    msys2_plen = len(msys2_prefix)
    # For each line in the updated loader cache...
    for line in cachedata.splitlines():
        if line.startswith('#'):
            continue
        if line.startswith(prefix):
            line = '"@executable_path/' + LOADER_CACHE_DEST_PATH + line[plen:]
        elif line.startswith(win_prefix):
            line = '"' + LOADER_CACHE_DEST_PATH.replace('/', '\\\\') + line[win_plen:]
        elif line.startswith(msys2_prefix):
            line = ('"' + LOADER_CACHE_DEST_PATH + line[msys2_plen:]).replace('/', '\\\\')
        output_lines.append(line)
    return '\n'.join(output_lines)