code: def twitterclass_demo():
      """
      Use the simplified :class:`Twitter` class to write some tweets to a file.
      """
      tw = Twitter()
      print("Track from the public stream\n")
      tw.tweets(keywords="love, hate", limit=10)  # public stream
      print(SPACER)
      print("Search past Tweets\n")
      tw = Twitter()
      tw.tweets(
          keywords="love, hate", stream=False, limit=10
      )  # search past tweets
      print(SPACER)
      print(
          "Follow two accounts in the public stream"
          + " -- be prepared to wait a few minutes\n"
      )
      tw = Twitter()
      tw.tweets(follow=["759251", "6017542"], stream=True, limit=5)
  
file_path: nltk/nltk/twitter/twitter_demo.py
imports: import datetime
  import json
  from functools import wraps
  from io import StringIO
  from nltk.twitter import Query, Streamer, TweetViewer, TweetWriter, Twitter, credsfromfile
label_desc: Use image node_id 4 for calling a global function with example usage: twitterclass_demo() without return types