Get the Crab Gateway

    :rtype: :class:`crabpy.gateway.crab.CrabGateway`
    # argument might be a config or a request

def get_crab(registry):
    """
    Get the Crab Gateway

    :rtype: :class:`crabpy.gateway.crab.CrabGateway`
    # argument might be a config or a request
    """
    # argument might be a config or a request
    regis = getattr(registry, 'registry', None)
    if regis is None:
        regis = registry

    return regis.queryUtility(ICrab)