code: def test_ambiguity_resolver():
      foo = _query(
          request="foo",
          ambiguity_resolver=AmbiguityResolver(
              closest_coord=GeoPoint(1, 2)
          ),
      )
  
      request: GeocodingRequest = (
          RequestBuilder()
          .set_request_kind(RequestKind.geocoding)
          .set_namesake_limit(10)
          .set_queries([foo])
          .build()
      )
  
      json = RequestFormatter().format(request).to_dict()
  
      parsed_request = RequestParser().parse(json)
  
      assert isinstance(parsed_request, GeocodingRequest)
      assert 1 == len(parsed_request.region_queries)
      assert_region_query(foo, parsed_request.region_queries[0])
  
file_path: lets-plot/python-package/test/geo_data/gis/test_request_formatter.py
imports: from typing import Optional
  from assertions import assert_region_query
  from lets_plot.geo_data.gis.geometry import GeoRect, GeoPoint
  from lets_plot.geo_data.gis.json_request import RequestFormatter, RequestParser
  from lets_plot.geo_data.gis.request import RequestBuilder, ExplicitRequest, RequestKind, GeocodingRequest, RegionQuery, MapRegion, PayloadKind, AmbiguityResolver, IgnoringStrategyKind, ReverseGeocodingRequest
  from lets_plot.geo_data.gis.response import LevelKind
label_desc: Use image node_id 4 for calling a global function with example usage: test_ambiguity_resolver() without return types