code: def quadtree_point_in_polygon(
      poly_quad_pairs,
      quadtree,
      point_indices,
      points: GeoSeries,
      polygons: GeoSeries,
  ):
      """Test whether the specified points are inside any of the specified
      polygons.
  
      Uses the table of (polygon, quadrant) pairs returned by
      ``cuspatial.join_quadtree_and_bounding_boxes`` to ensure only the points
      in the same quadrant as each polygon are tested for intersection.
  
      This pre-filtering can dramatically reduce number of points tested per
      polygon, enabling faster intersection-testing at the expense of extra
      memory allocated to store the quadtree and sorted point_indices.
  
      Parameters
      ----------
      poly_quad_pairs: cudf.DataFrame
          Table of (polygon, quadrant) index pairs returned by
          ``cuspatial.join_quadtree_and_bounding_boxes``.
      quadtree : cudf.DataFrame
          A complete quadtree for a given area-of-interest bounding box.
      point_indices : cudf.Series
          Sorted point indices returned by ``cuspatial.quadtree_on_points``
      points: GeoSeries
          Points used to build the quadtree
      polygons: GeoSeries
          Polygons to test against
  
      Returns
      -------
      result : cudf.DataFrame
          Indices for each intersecting point and polygon pair.
  
          polygon_index : cudf.Series
              Index of containing polygon.
          point_index : cudf.Series
              Index of contained point. This index refers to ``point_indices``,
              so it is an index to an index.
      """
  
      if not contains_only_points(points):
          raise ValueError(
              "`point` Geoseries must contains only point geometries."
          )
      if not contains_only_polygons(polygons):
          raise ValueError(
              "`polygons` Geoseries must contains only polygons geometries."
          )
  
      points_x = as_column(points.points.x)
      points_y = as_column(points.points.y)
  
      poly_offsets = as_column(polygons.polygons.part_offset)
      ring_offsets = as_column(polygons.polygons.ring_offset)
      poly_points_x = as_column(polygons.polygons.x)
      poly_points_y = as_column(polygons.polygons.y)
  
      return DataFrame._from_data(
          *spatial_join.quadtree_point_in_polygon(
              poly_quad_pairs,
              quadtree,
              point_indices._column,
              points_x,
              points_y,
              poly_offsets,
              ring_offsets,
              poly_points_x,
              poly_points_y,
          )
      )
  
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 3 for calling a global function with example usage: quadtree_point_in_polygon(poly_quad_pairs, quadtree, point_indices, points, polygons) and returns: DataFrame