code: def test_global_scope():
      # scope should be applied to whole request, not to queries
  
      builder: NamesGeocoder = geocode(names="foo")
  
      # single str scope
      assert_that(builder.scope("bar")).has_scope(
          ScopeMatcher().with_names(["bar"])
      ).has_query(QueryMatcher().with_name("foo").scope(empty()))
  
      # single regions scope
      assert_that(
          builder.scope(make_simple_region("bar", "bar_id"))
      ).has_scope(ScopeMatcher().with_ids(["bar_id"])).has_query(
          QueryMatcher().with_name("foo").scope(empty())
      )
  
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 16 for calling a global function with example usage: test_global_scope() without return types