code: def test_children():
      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>"
          assert len(g) == 2
          assert g.status_code == 200
  
          expected_names = ["Birch Manor", "Templeton-Est"]
          expected_geonames_id = [5901584, 6162703]
          assert expected_names == [res.address for res in g]
          assert expected_geonames_id == [res.geonames_id for res in g]
  
file_path: geocoder/tests/test_geonames.py
imports: import json
  import pytest
  import geocoder
  import requests_mock
label_desc: Use image node_id 10 for calling a global function with example usage: test_children() without return types