def get_form(case, action_filter=lambda a: True, form_filter=lambda f: True, reverse=False):
    """
    returns the first form that passes through both filter functions
    """
    gf = get_forms(case, action_filter=action_filter, form_filter=form_filter, reverse=reverse)
    try:
        return gf.next()
    except __HOLE__:
        return None
dataset/ETHPy150Open dimagi/commcare-hq/custom/bihar/calculations/utils/calculations.py/get_form