code: def test_children_delegation():
      url = "http://api.geonames.org/childrenJSON?geonameId=6094817&username=mock"
      data_file = "tests/results/geonames_children.json"
      with requests_mock.Mocker() as mocker, open(
          data_file, "r"
      ) as input:
          mocker.get(url, text=input.read())
          g = geocoder.geonames(6094817, method="children", key="mock")
          assert g.ok
          assert repr(g) == "<[OK] Geonames - Children #2 results>"
  
          # next calls are delegated to result
          assert g.address == "Birch Manor"
          assert g.geonames_id == 5901584
  
          g.set_default_result(1)
          assert g.address == "Templeton-Est"
          assert g.geonames_id == 6162703
  
file_path: geocoder/tests/test_geonames.py
imports: import json
  import pytest
  import geocoder
  import requests_mock
label_desc: Use image node_id 11 for calling a global function with example usage: test_children_delegation() without return types