class_docstr: A class for handling connections and interactions with the Twitter API.
  
  Attributes:
      bearer_token (str): The consumer key for the Twitter app.
      api (tweepy.API): The `tweepy.API` object for interacting with the Twitter API.
code: def create_connection(self, api_version=2):
      if api_version == 1:
          auth = tweepy.OAuthHandler(
              self.connection_args["consumer_key"],
              self.connection_args["consumer_secret"],
          )
          auth.set_access_token(
              self.connection_args["access_token"],
              self.connection_args["access_token_secret"],
          )
          return tweepy.API(auth)
  
      return tweepy.Client(**self.connection_args)
  
imports: import re
  import os
  import datetime
  import ast
  import time
  from collections import defaultdict
  import pytz
  import io
  import requests
  import pandas
  import tweepy
  from mindsdb.utilities import log
  from mindsdb.utilities.config import Config
  from mindsdb_sql.parser import ast
  from mindsdb.integrations.libs.api_handler import APIHandler, APITable, FuncParser
  from mindsdb.integrations.utilities.sql_utils import extract_comparison_conditions
  from mindsdb.integrations.utilities.date_utils import parse_utc_date
  from mindsdb.integrations.libs.response import HandlerStatusResponse, HandlerResponse, RESPONSE_TYPE
label_desc: Use image node_id 2 for calling the TwitterHandler obj's underlying member method code with example usage: obj.create_connection(api_version) and returns: tweepy, tweepy