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 _apply_filters(self, data, filters):
      if not filters:
          return data
  
      data2 = []
      for row in data:
          add = False
          for op, key, value in filters:
              value2 = row.get(key)
              if isinstance(value, int):
                  # twitter returns ids as string
                  value = str(value)
  
              if op in ("!=", "<>"):
                  if value == value2:
                      break
              elif op in ("==", "="):
                  if value != value2:
                      break
              elif op == "in":
                  if not isinstance(value, list):
                      value = [value]
                  if value2 not in value:
                      break
              elif op == "not in":
                  if not isinstance(value, list):
                      value = [value]
                  if value2 in value:
                      break
              else:
                  raise NotImplementedError(f"Unknown filter: {op}")
              # only if there wasn't breaks
              add = True
          if add:
              data2.append(row)
      return data2
  
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 6 for calling the TwitterHandler obj's underlying member method code with example usage: obj._apply_filters(data, filters) and returns: data2, data