def check_send_message(sender: UserProfile, client: Client, message_type_name: str, message_to: Union[(Sequence[int], Sequence[str])], topic_name: Optional[str], message_content: str, realm: Optional[Realm]=None, forged: bool=False, forged_timestamp: Optional[float]=None, forwarder_user_profile: Optional[UserProfile]=None, local_id: Optional[str]=None, sender_queue_id: Optional[str]=None, widget_content: Optional[str]=None) -> int:
    addressee = Addressee.legacy_build(sender, message_type_name, message_to, topic_name)
    message = check_message(sender, client, addressee, message_content, realm, forged, forged_timestamp, forwarder_user_profile, local_id, sender_queue_id, widget_content)
    return do_send_messages([message])[0]
def check_send_message(sender: UserProfile, client: Client, message_type_name: str, message_to: Union[(Sequence[int], Sequence[str])], topic_name: Optional[str], message_content: str, realm: Optional[Realm]=None, forged: bool=False, forged_timestamp: Optional[float]=None, forwarder_user_profile: Optional[UserProfile]=None, local_id: Optional[str]=None, sender_queue_id: Optional[str]=None, widget_content: Optional[str]=None) -> int:
    addressee = Addressee.legacy_build(sender, message_type_name, message_to, topic_name)
    message = check_message(sender, client, addressee, message_content, realm, forged, forged_timestamp, forwarder_user_profile, local_id, sender_queue_id, widget_content)
    return do_send_messages([message])[0]