def get_by_id(id):
    """
    Get site instance from settings configuration.
    """
    sites = _get_sites_config()

    try:
        return Site(sites[id])
    except __HOLE__:
        raise exceptions.SiteNotFound("Site with id '{}' not found".format(id))
dataset/ETHPy150Open niwinz/django-sites/django_sites/base.py/get_by_id