code: def test_geocode_centroid(mock_request):
      try:
          make_geocode_region(
              REQUEST, REGION_NAME, REGION_ID, REGION_HIGHLIGHTS
          ).centroids()
      except ValueError:
          pass  # response doesn't contain proper feature with ids - ignore
  
      mock_request.assert_called_with(
          ExplicitRequest(
              requested_payload=[PayloadKind.centroids], ids=REGION_LIST
          )
      )
  
imports: from unittest import mock
  import pytest
  from pandas import DataFrame
  from lets_plot.geo_data import geocode
  from lets_plot.geo_data.geocoder import _to_scope
  from lets_plot.geo_data.geocodes import _ensure_is_list, Geocodes, DF_COLUMN_ID, DF_COLUMN_FOUND_NAME, DF_COLUMN_CENTROID, DF_COLUMN_POSITION, DF_COLUMN_LIMIT
  from lets_plot.geo_data.gis.geocoding_service import GeocodingService
  from lets_plot.geo_data.gis.request import MapRegion, RegionQuery, GeocodingRequest, PayloadKind, ExplicitRequest, AmbiguityResolver
  from lets_plot.geo_data.gis.response import LevelKind, FeatureBuilder, GeoPoint, Answer
  from lets_plot.geo_data.livemap_helper import _prepare_location, RegionKind, _prepare_parent, LOCATION_LIST_ERROR_MESSAGE, LOCATION_DATAFRAME_ERROR_MESSAGE
  from geo_data_test_util import make_geocode_region, make_success_response, features_to_answers, features_to_queries, COLUMN_NAME_CITY
label_desc: Use image node_id 8 for calling a global function with example usage: test_geocode_centroid(mock_request) without return types