code: def test_allow_ambiguous_and_closest_to():
      request = (
          geocode(names=["foo", "bar"])
          .where("foo", closest_to=shapely.geometry.Point(1, 2))
          .allow_ambiguous()
          ._build_request()
      )
  
      assert_that(request).allows_ambiguous().has_query(
          QueryMatcher()
          .with_name("foo")
          .ambiguity_resolver(
              eq(AmbiguityResolver(closest_coord=GeoPoint(1, 2)))
          )
      ).has_query(
          QueryMatcher()
          .with_name("bar")
          .ambiguity_resolver(
              eq(
                  AmbiguityResolver(
                      ignoring_strategy=IgnoringStrategyKind.take_namesakes
                  )
              )
          )
      )
  
imports: from typing import Optional, Union, List, Callable
  from unittest import mock
  import shapely
  from lets_plot.geo_data import GeocodingService, SuccessResponse, Answer, GeocodedFeature
  from lets_plot.geo_data import geocode, geocode_cities, geocode_states, geocode_countries
  from lets_plot.geo_data.gis.geometry import GeoRect, GeoPoint
  from lets_plot.geo_data.gis.request import MapRegion, AmbiguityResolver, GeocodingRequest, LevelKind, RegionQuery, IgnoringStrategyKind
  from lets_plot.geo_data.geocoder import NamesGeocoder
  from lets_plot.geo_data.geocodes import Geocodes
  from geo_data_test_util import make_answer, assert_row
  from request_assertion import GeocodingRequestAssertion, QueryMatcher, ScopeMatcher, ValueMatcher, eq, empty, eq_map_region_with_name, eq_map_region_with_id
label_desc: Use image node_id 15 for calling a global function with example usage: test_allow_ambiguous_and_closest_to() without return types