def METHOD_NAME(self, context):
    filter_name = context['name']
    name_to_class = {f.name: f for f in self.report_filters}
    try:
        filter_class = name_to_class[filter_name]
        return filter_class(self.request, self.domain, context)
    except (KeyError, NameError):
        raise ReportFilterNotFound(
            _("Could not find the report filter '{}'").format(filter_name)
        )