def METHOD_NAME(sender, message, lang):
    if sender.group_manager:
        sender_packet = ChatManager._get_message_packet(sender.guid, sender.chat_flags, message,
                                                        ChatMsgs.CHAT_MSG_PARTY, lang)
        sender.group_manager.send_packet_to_members(sender_packet, source=sender, use_ignore=True)
        ChatLogManager.log_chat(sender, message, ChatMsgs.CHAT_MSG_PARTY)
    else:
        GroupManager.send_group_operation_result(sender, PartyOperations.PARTY_OP_LEAVE, '',
                                                 PartyResults.ERR_NOT_IN_GROUP)