<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def filter_content_types(self, content_type_qs):
 """ Filter the content types selectable to only event subclasses """

        valid_ct_ids = []
        for ct in content_type_qs:
            model = ct.model_class()
            if model and issubclass(model, EventBase):
                valid_ct_ids.append(ct.id)
        return content_type_qs.filter(pk__in=valid_ct_ids)