def get_links(sp_config):
    """
    Returns a list of (resource, pattern) tuples for the 'links' for an sp.
    """
    links = sp_config.get('links', [])
    if type(links) is dict:
        links = links.items()
    return links
