<commit_before><commit_msg>Add Broker mixin to bongo client<commit_after>module.exports = do->  
  afterInit:do ->
    channels = {}
    ->
      {broadcastable} = @constructor
      id = @getId?() or @bongo_?.instanceId
      if broadcastable and id?
        name = "object-#{id}"
        @channel = channels[name] or= @mq.subscribe name
        @channel.on 'updateInstance', (data)=> @update_(data)
  
  destroy:->
    ###@mq.unsubscribe "object-#{id}"###
  
  on:(event, listener)->
    {constructor} = @    
    @channel.on event, listener

  off:(event, listener)->
    @channel.off event, listener
{'fraction_non_alphanumeric': 0.15920398009950248, 'fraction_numerical': 0.0, 'mean_word_length': 2.8471337579617835, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3136100', 'n_tokens_mistral': 194, 'n_tokens_neox': 193, 'n_words': 44}