code: def _get_pageid_from_api(title, client=None):
      pageid = None
  
      title_html = title.strip().replace(" ", "%20")
      url = "https://en.wikipedia.org/w/api.php?action=query&titles={}&format=json".format(
          title_html
      )
  
      try:
          # Package the request, send the request and catch the response: r
          r = requests.get(url)
  
          # Decode the JSON data into a dictionary: json_data
          json_data = r.json()
  
          if len(json_data["query"]["pages"]) > 1:
              print(
                  "WARNING: more than one result returned from wikipedia api"
              )
  
          for _, v in json_data["query"]["pages"].items():
              pageid = v["pageid"]
      except:
          pass
  
      return pageid
  
file_path: BLINK/scripts/create_BLINK_benchmark_data.py
imports: import json
  import os
  import requests
  from bs4 import BeautifulSoup
  from tqdm import tqdm
label_desc: Use image node_id 2 for calling a global function with example usage: _get_pageid_from_api(title, client) and returns: pageid