(xforms, case_db)
return CaseProcessingResult(
        domain,
        [update.case for update in touched_cases.values()],
    )
Given an xform document, update any case blocks found within it,
    returning a dictionary mapping the case ids affected to the
    couch case document objects
Given an xform document, update any case blocks found within it,
    returning a dictionary mapping the case ids affected to the
    couch case document objects
Given an xform document update any case blocks found within it returning a dictionary mapping the case ids affected to the couch case document objects
def _get_or_update_cases(xforms, case_db):
    """
    Given an xform document, update any case blocks found within it,
    returning a dictionary mapping the case ids affected to the
    couch case document objects
    """
    domain = getattr(case_db, 'domain', None)
    touched_cases = FormProcessorInterface(domain).get_cases_from_forms(case_db, xforms)
    _validate_indices(case_db, touched_cases.values())
    return CaseProcessingResult(
        domain,
        [update.case for update in touched_cases.values()],
    )
def _get_or_update_cases ( xforms , case_db ) : domain = getattr ( case_db , 'domain' , None ) touched_cases = FormProcessorInterface ( domain ) . get_cases_from_forms ( case_db , xforms ) _validate_indices ( case_db , touched_cases . values ( ) ) return CaseProcessingResult ( domain , [ update . case for update in touched_cases . values ( ) ] , )