def METHOD_NAME(player_mgr, petition_owner, petition):
    if petition and petition_owner:
        if petition_owner != player_mgr.guid:
            PetitionManager.send_petition_sign_result(player_mgr, PetitionError.PETITION_CHARTER_CREATOR)
        elif len(petition.characters) < 9:
            PetitionManager.send_petition_sign_result(player_mgr, PetitionError.PETITION_NOT_ENOUGH_SIGNATURES)
        elif player_mgr.guild_manager:
            PetitionManager.send_petition_sign_result(player_mgr, PetitionError.PETITION_ALREADY_IN_GUILD)
        else:
            # If not able to create a guild, GuildManager will report the error.
            if GuildManager.create_guild(player_mgr, petition.name, petition=petition):
                data = pack('<I', PetitionError.PETITION_SUCCESS)
                packet = PacketWriter.get_packet(OpCode.SMSG_TURN_IN_PETITION_RESULTS, data)
                player_mgr.enqueue_packet(packet)
                RealmDatabaseManager.guild_petition_destroy(petition)
                player_mgr.inventory.remove_items(PetitionManager.CHARTER_ENTRY, 1)
    else:
        PetitionManager.send_petition_sign_result(player_mgr, PetitionError.PETITION_UNKNOWN_ERROR)