(self, contact, content, case_id=None)
return MessagingSubEvent.objects.create(
            parent=self,
            date=datetime.utcnow(),
            recipient_type=recipient_type,
            recipient_id=contact.get_id if recipient_type else None,
            content_type=content_type,
            app_id=app_id,
            form_unique_id=form_unique_id,
            form_name=form_name,
            case_id=case_id,
            status=self.STATUS_IN_PROGRESS,
        )
In the subevent context, the contact is always going to either be
        a user or a case.

        content is an instance of a subclass of corehq.messaging.scheduling.models.Content
In the subevent context, the contact is always going to either be
        a user or a case.
In the subevent context the contact is always going to either be a user or a case .
def create_subevent_from_contact_and_content(self, contact, content, case_id=None):
        """
        In the subevent context, the contact is always going to either be
        a user or a case.

        content is an instance of a subclass of corehq.messaging.scheduling.models.Content
        """
        recipient_type = self.get_recipient_type(contact)

        content_type, app_id, form_unique_id, form_name = (
            self.get_content_info_from_content_object(self.domain, content)
        )

        return MessagingSubEvent.objects.create(
            parent=self,
            date=datetime.utcnow(),
            recipient_type=recipient_type,
            recipient_id=contact.get_id if recipient_type else None,
            content_type=content_type,
            app_id=app_id,
            form_unique_id=form_unique_id,
            form_name=form_name,
            case_id=case_id,
            status=self.STATUS_IN_PROGRESS,
        )
def create_subevent_from_contact_and_content ( self , contact , content , case_id = None ) : recipient_type = self . get_recipient_type ( contact ) content_type , app_id , form_unique_id , form_name = ( self . get_content_info_from_content_object ( self . domain , content ) ) return MessagingSubEvent . objects . create ( parent = self , date = datetime . utcnow ( ) , recipient_type = recipient_type , recipient_id = contact . get_id if recipient_type else None , content_type = content_type , app_id = app_id , form_unique_id = form_unique_id , form_name = form_name , case_id = case_id , status = self . STATUS_IN_PROGRESS , )