code: def collect_results(rule, max_results=500, result_stream_args=None):
      
      if result_stream_args is None:
          logger.error("This function requires a configuration dict for the "
                       "inner ResultStream object.")
          raise KeyError
  
      rs = ResultStream(rule_payload=rule,
                        max_results=max_results,
                        **result_stream_args)
      return list(rs.stream())
docs: Utility function to quickly get a list of tweets from a ``ResultStream``
      without keeping the object around. Requires your args to be configured
      prior to using.
  
      Args:
          rule (str): valid powertrack rule for your account, preferably
          generated by the `gen_rule_payload` function.
          max_results (int): maximum number of tweets or counts to return from
          the API / underlying ``ResultStream`` object.
          result_stream_args (dict): configuration dict that has connection
          information for a ``ResultStream`` object.
  
      Returns:
          list of results
  
      Example:
          >>> from searchtweets import collect_results
          >>> tweets = collect_results(rule,
                                       max_results=500,
                                       result_stream_args=search_args)