code: def geom_xys(geom):
      
      if geom.has_z:
          # hack to convert to 2D, https://gist.github.com/ThomasG77/cad711667942826edc70
          geom = wkt.loads(geom.to_wkt())
          assert not geom.has_z
  
      if hasattr(geom, "geoms"):
          geoms = geom.geoms
      else:
          geoms = [geom]
  
      for g in geoms:
          arr = g.array_interface_base['data']
          for pair in zip(arr[::2], arr[1::2]):
              yield pair
docs: Given a shapely geometry,
      generate a flattened series of 2D points as x,y tuples