code: def geom_to_arr(geom):
      """
      LineString, LinearRing and Polygon (exterior only?)
      """
      # LineString and LinearRing geoms have an xy attribute
      try:
          xy = getattr(geom, "xy", None)
      except NotImplementedError:
          xy = None
      if xy is not None:
          return np.column_stack(xy)
  
      # Polygon
      # shapely 1.8.0 deprecated `array_interface` and
      # unfortunately also introduced a bug in the `array_interface_base`
      # property which raised an error as soon as it was called.
      if shapely_version < Version("1.8.0"):
          if hasattr(geom, "array_interface"):
              data = geom.array_interface()
              return np.array(data["data"]).reshape(data["shape"])[
                  :, :2
              ]
          arr = geom.array_interface_base["data"]
      else:
          arr = np.asarray(geom.exterior.coords)
  
      if (len(arr) % 2) != 0:
          arr = arr[:-1]
      return np.array(arr).reshape(-1, 2)
  
imports: import warnings
  import numpy
  import shapely
  import shapely.geometry
  from cartopy import crs
  from cartopy.io.img_tiles import GoogleTiles, QuadtreeTiles
  from holoviews.element import Tiles
  from packaging.version import Version
  from shapely.geometry import LinearRing, LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon, box
  from shapely.geometry.base import BaseMultipartGeometry
  from shapely.ops import transform
  from ._warnings import deprecated, warn
label_desc: Use image node_id 10 for calling a global function with example usage: geom_to_arr(geom) and returns: np, np, np