code: def test_opencage():
      """Expected result :
      https://api.opencagedata.com/geocode/v1/json?q=Ottawa,Ontario&key=YOUR-API-KEY
      """
      g = geocoder.opencage(location)
      assert g.ok
      assert len(g) == 1
      assert g.country_code == "ca"
      assert g.state == "Ontario"
      assert g.state_code == "ON"
      assert g.city == "Ottawa"
      assert g.town == "Ottawa"
      osm_count, fields_count = g.debug()[0]
      assert osm_count >= 3
      assert fields_count >= 23
  
file_path: geocoder/tests/test_opencage.py
imports: import os
  import geocoder
  import requests_mock
label_desc: Use image node_id 1 for calling a global function with example usage: test_opencage() without return types