code: def test_feature_artist_draw_styler(path_collection_cls, feature):
      geoms = list(feature.geometries())
      style1 = {"facecolor": "blue", "edgecolor": "white"}
      style2 = {"color": "black", "linewidth": 1}
      style2_finalized = style.finalize(style.merge(style2))
  
      def styler(geom):
          if geom == geoms[0]:
              return style1
          else:
              return style2
  
      fa = FeatureArtist(feature, styler=styler, linewidth=2)
      extent = [-10, 10, -10, 10]
      prj_crs = ccrs.Robinson()
      fa.axes = mocked_axes(extent, projection=prj_crs)
      fa.draw(mock.sentinel.renderer)
  
      transform = prj_crs._as_mpl_transform(fa.axes)
  
      calls = [
          {
              "paths": (cached_paths(geoms[0], prj_crs),),
              "style": dict(linewidth=2, **style1),
          },
          {
              "paths": (cached_paths(geoms[1], prj_crs),),
              "style": style2_finalized,
          },
      ]
  
      assert path_collection_cls.call_count == 2
      for expected_call, (actual_args, actual_kwargs) in zip(
          calls, path_collection_cls.call_args_list
      ):
          assert expected_call["paths"] == actual_args
          assert transform == actual_kwargs.pop("transform")
          assert expected_call["style"] == actual_kwargs
  
file_path: cartopy/lib/cartopy/tests/mpl/test_feature_artist.py
imports: from unittest import mock
  from matplotlib.transforms import IdentityTransform
  import numpy
  import pytest
  import shapely.geometry
  import cartopy.crs
  from cartopy.feature import ShapelyFeature
  from cartopy.mpl import style
  from cartopy.mpl.feature_artist import FeatureArtist, _freeze, _GeomKey
  import cartopy.mpl.geoaxes
label_desc: Use image node_id 7 for calling a global function with example usage: test_feature_artist_draw_styler(path_collection_cls, feature) and returns: style1, style2