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):
                  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}")
              add = True
          if add:
              data2.append(row)
      return data2
  
file_path: mindsdb/mindsdb/integrations/handlers/notion_handler/notion_handler.py
imports: import time
  import pandas
  from collections import defaultdict
  from notion_client import Client
  from mindsdb.utilities import log
  from mindsdb.integrations.libs.api_handler import APIHandler
  from mindsdb.integrations.libs.response import HandlerStatusResponse, HandlerResponse, RESPONSE_TYPE
  from .notion_table import NotionBlocksTable, NotionCommentsTable, NotionDatabaseTable, NotionPagesTable
label_desc: Use image node_id 5 for calling the NotionHandler obj's underlying member method code with example usage: obj._apply_filters(data, filters) and returns: data2, data