def _get_total_eligible(self, form, namespaces, restrict_4th_visit=False):
        self._update_form_ids()
        if form.xmlns not in namespaces or (restrict_4th_visit and form.form.get("visits", "") != "4"):
            return False
        for status_element in self.status_dict.get("eligible", []):
            if form._id == status_element["form_id"] and (status_element["is_booking"] or status_element["immunized"]):
                return True
        return False
dataset/ETHPy150Open dimagi/commcare-hq/custom/m4change/user_calcs/mcct_monthly_aggregate_report_calcs.py/StatusCalculator._get_total_eligible/original