def get_and_check_xform_domain(xform):
    try:
        domain = xform.domain
    except __HOLE__:
        domain = None

    if not domain and settings.CASEXML_FORCE_DOMAIN_CHECK:
        raise NoDomainProvided()

    return domain
dataset/ETHPy150Open dimagi/commcare-hq/corehq/ex-submodules/casexml/apps/case/xform.py/get_and_check_xform_domain