code: def api(url):
      json = requests.get(
          url=url, headers={"Authorization": f"token {token}"}
      ).json()
      if "message" in json and json["message"] == "Bad credentials":
          raise RuntimeError("Invalid token provided")
      else:
          return json
  
imports: import os
  import sys
  import requests
label_desc: Use image node_id 1 for calling a global function with example usage: api(url) and returns: json