Determine if a package or runtime is installed.

    Args:
        name (str): The name of the package or the runtime.

    Returns:
        bool: True if the specified package or runtime is installed.

    CLI Example:

    .. code-block:: bash

        salt '*' flatpak.is_installed org.gimp.GIMP

def is_installed(name):
    '''
    Determine if a package or runtime is installed.

    Args:
        name (str): The name of the package or the runtime.

    Returns:
        bool: True if the specified package or runtime is installed.

    CLI Example:

    .. code-block:: bash

        salt '*' flatpak.is_installed org.gimp.GIMP
    '''
    out = __salt__['cmd.run_all'](FLATPAK_BINARY_NAME + ' info ' + name)

    if out['retcode'] and out['stderr']:
        return False
    else:
        return True