def is_stillborn(case):
    properties = (
        'child_cried',
        'child_breathing',
        'child_movement',
        'child_heartbeats'
    )
    for xform in get_forms(case, action_filter=lambda a: a.xform_xmlns == DELIVERY):
        if xform.form.get('has_delivered') != 'yes':
            continue
        for p in properties:
            value = xform.get_data(p % 'form/child_info/%s')
            if not value:
                child_infos = xform.get_data('form/child_info')
                if not child_infos:
                    continue
                for child_info in child_infos:
                    child_info.get(p)
                    # no idea whether this is a thing that can get called
                    logging.debug('(nested) %s: %s' % (p, value))
                    if value != 'no':
                        return False
            else:
                if value != 'no':
                    return False
        return True
dataset/ETHPy150Open dimagi/commcare-hq/custom/bihar/calculations/mortality.py/is_stillborn/swapped operands of `%`