code: def point_in_polygon(points: GeoSeries, polygons: GeoSeries):
      """Compute from a set of points and a set of polygons which points fall
      within which polygons. Note that `polygons_(x,y)` must be specified as
      closed polygons: the first and last coordinate of each polygon must be
      the same.
  
      Parameters
      ----------
      points : GeoSeries
          A Series of points to test
      polygons: GeoSeries
          A Series of polygons to test
  
      Examples
      --------
      Test whether 3 points fall within either of two polygons
  
      >>> result = cuspatial.point_in_polygon(
          GeoSeries([Point(0, 0), Point(-8, -8), Point(6, 6)]),
          GeoSeries([
              Polygon([(-10, -10), (5, -10), (5, 5), (-10, 5), (-10, -10)]),
              Polygon([(0, 0), (10, 0), (10, 10), (0, 10), (0, 0)])
          ], index=['nyc', 'hudson river'])
      )
      # The result of point_in_polygon is a DataFrame of Boolean
      # values indicating whether each point (rows) falls within
      # each polygon (columns).
      >>> print(result)
                  nyc            hudson river
      0          True          True
      1          True         False
      2         False          True
      # Point 0: (0, 0) falls in both polygons
      # Point 1: (-8, -8) falls in the first polygon
      # Point 2: (6.0, 6.0) falls in the second polygon
  
      Returns
      -------
      result : cudf.DataFrame
          A DataFrame of boolean values indicating whether each point falls
          within each polygon.
      """
  
      if len(polygons) == 0:
          return DataFrame()
  
      # The C++ API only supports single-polygon, reject if input has
      # multipolygons
      if len(polygons.polygons.part_offset) != len(
          polygons.polygons.geometry_offset
      ):
          raise ValueError("GeoSeries cannot contain multipolygon.")
  
      x = as_column(points.points.x)
      y = as_column(points.points.y)
  
      poly_offsets = as_column(polygons.polygons.part_offset)
      ring_offsets = as_column(polygons.polygons.ring_offset)
      px = as_column(polygons.polygons.x)
      py = as_column(polygons.polygons.y)
  
      result = cpp_point_in_polygon(
          x, y, poly_offsets, ring_offsets, px, py
      )
      result = DataFrame(
          pip_bitmap_column_to_binary_array(
              polygon_bitmap_column=result, width=len(poly_offsets) - 1
          )
      )
  
      result.columns = polygons.index[::-1]
      return DataFrame._from_data(
          {
              name: result[name].astype("bool")
              for name in reversed(result.columns)
          }
      )
  
file_path: cuspatial/python/cuspatial/cuspatial/core/spatial/join.py
imports: import warnings
  from cudf import DataFrame
  from cudf.core.column import as_column
  from cuspatial import GeoSeries
  from cuspatial._lib import spatial_join
  from cuspatial._lib.point_in_polygon import point_in_polygon
  from cuspatial.utils.column_utils import contains_only_linestrings, contains_only_points, contains_only_polygons
  from cuspatial.utils.join_utils import pip_bitmap_column_to_binary_array
label_desc: Use image node_id 1 for calling a global function with example usage: point_in_polygon(points, polygons) and returns: DataFrame, DataFrame