code: def test_map_join_with_geodata(map_join, map_columns, expected):
      class MockGeocoder(Geocoder):
          def get_centroids(self) -> "GeoDataFrame":
              return geo_data_frame([Point(-5, 17)], map_columns)
  
          def get_geocodes(self) -> pandas.DataFrame:
              return pandas.DataFrame(columns=map_columns)
  
      def run_test(map_param):
          if not isinstance(expected, str):
              plot_spec = ggplot() + geom_point(
                  map_join=map_join, map=map_param
              )
              assert get_layer_spec(plot_spec, "map_join") == expected
          else:
              assert_error(
                  expected,
                  lambda: ggplot()
                  + geom_point(map_join=map_join, map=map_param),
              )
  
      run_test(MockGeocoder())  # with geocoder
      run_test(MockGeocoder().get_centroids())
  
imports: import pandas
  import pytest
  from geopandas import GeoDataFrame
  from pandas import DataFrame
  from shapely.geometry import Point, Polygon, LinearRing, MultiPolygon
  from lets_plot._kbridge import _standardize_plot_spec
  from lets_plot.geo_data import DF_COLUMN_CITY, DF_COLUMN_STATE, DF_COLUMN_COUNTY
  from lets_plot.geo_data.geocoder import Geocoder
  from lets_plot.plot import ggplot, geom_polygon, geom_point, geom_map, geom_rect, geom_text, geom_path, geom_livemap
  from lets_plot.plot import util
  from geo_data_test_util import get_map_data_meta, assert_error
label_desc: Use image node_id 14 for calling a global function with example usage: test_map_join_with_geodata(map_join, map_columns, expected) and returns: geo_data_frame, pandas