Get the :class:`skosprovider.registry.Registry` attached to this pyramid
    application.

    :rtype: :class:`skosprovider.registry.Registry`

def get_skos_registry(registry):
    '''
    Get the :class:`skosprovider.registry.Registry` attached to this pyramid
    application.

    :rtype: :class:`skosprovider.registry.Registry`
    '''
    # Argument might be a config or request
    regis = getattr(registry, 'registry', None)
    if regis is None:
        regis = registry
    return regis.queryUtility(ISkosRegistry)