code: def quadtree_point_to_nearest_linestring(
      linestring_quad_pairs,
      quadtree,
      point_indices,
      points: GeoSeries,
      linestrings: GeoSeries,
  ):
      """Finds the nearest linestring to each point in a quadrant, and computes
      the distances between each point and linestring.
  
      Uses the table of (linestring, quadrant) pairs returned by
      ``cuspatial.join_quadtree_and_bounding_boxes`` to ensure distances are
      computed only for the points in the same quadrant as each linestring.
  
      Parameters
      ----------
      linestring_quad_pairs: cudf.DataFrame
          Table of (linestring, 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 to find nearest linestring for
      linestrings: GeoSeries
          Linestrings to test for
  
      Returns
      -------
      result : cudf.DataFrame
          Indices for each point and its nearest linestring, and the distance
          between the two.
  
          point_index : cudf.Series
              Index of point. This index refers to ``point_indices``, so it is
              an index to an index.
          linestring_index : cudf.Series
              Index of the nearest linestring to the point.
          distance : cudf.Series
              Distance between point and its nearest linestring.
      """
  
      if not contains_only_points(points):
          raise ValueError(
              "`point` Geoseries must contains only point geometries."
          )
      if not contains_only_linestrings(linestrings):
          raise ValueError(
              "`linestrings` Geoseries must contains only linestring geometries."
          )
  
      if len(linestrings.lines.part_offset) != len(
          linestrings.lines.geometry_offset
      ):
          raise ValueError("GeoSeries cannot contain multilinestrings.")
  
      points_x = as_column(points.points.x)
      points_y = as_column(points.points.y)
  
      linestring_points_x = as_column(linestrings.lines.x)
      linestring_points_y = as_column(linestrings.lines.y)
      linestring_offsets = as_column(linestrings.lines.part_offset)
  
      return DataFrame._from_data(
          *spatial_join.quadtree_point_to_nearest_linestring(
              linestring_quad_pairs,
              quadtree,
              as_column(point_indices, dtype="uint32"),
              points_x,
              points_y,
              as_column(linestring_offsets, dtype="uint32"),
              linestring_points_x,
              linestring_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 4 for calling a global function with example usage: quadtree_point_to_nearest_linestring(linestring_quad_pairs, quadtree, point_indices, points, linestrings) and returns: DataFrame