def _get_numerator_action_filter(self, form, date):
        def _filter(a):
            return (visit_is(a, self.visit_type)  # right type
                    and date_in_range(a.date.date(), date)  # within window
                    and a.date > getters.date_modified(form, force_to_date=False, force_to_datetime=True)  # came after "due" visit
                    and a.xform_id not in self._visits_used)  # not already counted
        return _filter
The filter used to determine relevant actions from the numerator.
dataset/ETHPy150Open dimagi/commcare-hq/custom/bihar/calculations/homevisit.py/VisitCalculator._get_numerator_action_filter