code: def select(self, query: ast.Select) -> pd.DataFrame:
      conditions = extract_comparison_conditions(query.where)
  
      params = {}
  
      for op, arg1, arg2 in conditions:
          if arg1 == "query":
              params["q"] = urllib.parse.quote_plus(arg2)
          elif arg1 == "sources":
              if len(arg2.split(",")) > 20:
                  raise ValueError(
                      "The number of items it sources should be 20 or less"
                  )
              else:
                  params[arg1] = arg2
          elif arg1 == "publishedAt":
              if op == "Gt" or op == "GtE":
                  params["from"] = arg2
              if op == "Lt" or op == "LtE":
                  params["to"] = arg2
              elif op == "Eq":
                  params["from"] = arg2
                  params["to"] = arg2
          else:
              params[arg1] = arg2
  
      if query.limit:
          if query.limit.value > 100:
              params["page"], params["page_size"] = divmod(
                  query.limit.value, 100
              )
              if params["page_size"] == 0:
                  params["page_size"] = 100
          else:
              params["page_size"] = query.limit.value
              params["page"] = 1
      else:
          params["page_size"] = 100
          params["page"] = 1
  
      if query.order_by:
          if len(query.order_by) == 1:
              order_column = str(query.order_by[0]).split(".")[-1]
              if order_column not in ["relevancy", "publishedAt"]:
                  raise NotImplementedError(
                      "Not supported ordering by this field"
                  )
              params["sort_by"] = order_column
          else:
              raise ValueError(
                  "Multiple order by condition is not supported by the API"
              )
  
      selected_columns = []
  
      result = self.handler.call_application_api(params=params)
  
      if not result.empty:
          for target in query.targets:
              if isinstance(target, ast.Star):
                  selected_columns = self.get_columns()
                  break
              elif isinstance(target, ast.Identifier):
                  selected_columns.append(target.parts[-1])
              else:
                  raise ValueError(
                      f"Unknown query target {type(target)}"
                  )
  
      return result[selected_columns]
  
imports: import os
  import urllib
  from collections import OrderedDict
  from typing import Any
  import pandas
  from mindsdb_sql import parse_sql
  from mindsdb_sql.parser import ast
  from newsapi import NewsApiClient
  from mindsdb.api.executor.data_types.response_type import RESPONSE_TYPE
  from mindsdb.integrations.libs.api_handler import APIHandler, APITable
  from mindsdb.integrations.libs.const import HANDLER_CONNECTION_ARG_TYPE
  from mindsdb.integrations.libs.response import HandlerResponse, HandlerStatusResponse
  from mindsdb.integrations.utilities.sql_utils import extract_comparison_conditions
  from mindsdb.utilities.config import Config
label_desc: Use image node_id 2 for calling the NewsAPIArticleTable obj's underlying member method code with example usage: obj.select(query) and returns: result