class_docstr: Class responsible for connecting to Twitter's public stream API and dispatching events.
  Check https://dev.twitter.com/docs/streaming-apis/streams/public for more information.
  
  :param consumerKey: Consumer key.
  :type consumerKey: string.
  :param consumerSecret: Consumer secret.
  :type consumerSecret: string.
  :param accessToken: Access token.
  :type accessToken: string.
  :param accessTokenSecret: Access token secret.
  :type accessTokenSecret: string.
  :param track: A list of phrases which will be used to determine what Tweets will be delivered
      on the stream. A phrase may be one or more terms separated by spaces, and a phrase will match
      if all of the terms in the phrase are present in the Tweet, regardless of order and ignoring case.
  :type track: list.
  :param follow: A list of user IDs, indicating the users whose Tweets should be delivered on the
      stream. Following protected users is not supported.
  :type follow: list.
  :param languages: A list of language IDs a defined in http://tools.ietf.org/html/bcp47.
  :type languages: list.
  
  .. note::
      * Go to http://dev.twitter.com and create an app. The consumer key and secret will be generated for you after that.
      * Create an access token under the "Your access token" section.
      * At least **track** or **follow** have to be set.
class_docstr_tok: ["Class","responsible","for","connecting","to","Twitter","'s","public","stream","API","and","dispatching","events",".","Check","https",":","\/\/dev.twitter.com\/docs\/streaming-apis\/streams\/public","for","more","information",".",":","param","consumerKey",":","Consumer","key",".",":","type","consumerKey",":","string",".",":","param","consumerSecret",":","Consumer","secret",".",":","type","consumerSecret",":","string",".",":","param","accessToken",":","Access","token",".",":","type","accessToken",":","string",".",":","param","accessTokenSecret",":","Access","token","secret",".",":","type","accessTokenSecret",":","string",".",":","param","track",":","A","list","of","phrases","which","will","be","used","to","determine","what","Tweets","will","be","delivered","on","the","stream",".","A","phrase","may","be","one","or","more","terms","separated","by","spaces",",","and","a","phrase","will","match","if","all","of","the","terms","in","the","phrase","are","present","in","the","Tweet",",","regardless","of","order","and","ignoring","case",".",":","type","track",":","list",".",":","param","follow",":","A","list","of","user","IDs",",","indicating","the","users","whose","Tweets","should","be","delivered","on","the","stream",".","Following","protected","users","is","not","supported",".",":","type","follow",":","list",".",":","param","languages",":","A","list","of","language","IDs","a","defined","in","http",":","\/\/tools.ietf.org\/html\/bcp47",".",":","type","languages",":","list",".","..","note",":",":","*","Go","to","http",":","\/\/dev.twitter.com","and","create","an","app",".","The","consumer","key","and","secret","will","be","generated","for","you","after","that",".","*","Create","an","access","token","under","the","``","Your","access","token","''","section",".","*","At","least","*","*","track","*","*","or","*","*","follow","*","*","have","to","be","set","."]
code: def __dispatchImpl(self):
      ret = False
      try:
          nextTweet = json.loads(
              self.__queue.get(True, TwitterFeed.QUEUE_TIMEOUT)
          )
          ret = True
          self.__event.emit(nextTweet)
      except queue.Empty:
          pass
      return ret
  
imports: import threading
  import json
  from six.moves import queue
  import tweepy
  from tweepy import streaming
  from pyalgotrade import observer
  import pyalgotrade.logger
label_desc: Use image node_id 3 for calling the TwitterFeed obj's underlying member method code with example usage: obj.__dispatchImpl() and returns: ret