docstr: Convert the result of a quadtree contains_properly call from
  part indices to polygon indices.
  
  Parameters
  ----------
  point_result : cudf.Series
      The result of a quadtree contains_properly call. This result
      contains the `part_index` of the polygon that contains the
      point, not the polygon index.
  
  Returns
  -------
  cudf.Series
      The result of a quadtree contains_properly call. This result
      contains the `polygon_index` of the polygon that contains the
      point, not the part index.
docstr_tok: ["Convert","the","result","of","a","quadtree","contains_properly","call","from","part","indices","to","polygon","indices",".","Parameters","--","--","--","--","--","point_result",":","cudf.Series","The","result","of","a","quadtree","contains_properly","call",".","This","result","contains","the","`","part_index","`","of","the","polygon","that","contains","the","point",",","not","the","polygon","index",".","Returns","--","--","--","-","cudf.Series","The","result","of","a","quadtree","contains_properly","call",".","This","result","contains","the","`","polygon_index","`","of","the","polygon","that","contains","the","point",",","not","the","part","index","."]
code: def _convert_quadtree_result_from_part_to_polygon_indices(
      self, lhs, point_result
  ):
      """Convert the result of a quadtree contains_properly call from
      part indices to polygon indices.
  
      Parameters
      ----------
      point_result : cudf.Series
          The result of a quadtree contains_properly call. This result
          contains the `part_index` of the polygon that contains the
          point, not the polygon index.
  
      Returns
      -------
      cudf.Series
          The result of a quadtree contains_properly call. This result
          contains the `polygon_index` of the polygon that contains the
          point, not the part index.
      """
      # Get the length of each part, map it to indices, and store
      # the result in a dataframe.
      rings_to_parts = cp.array(lhs.polygons.part_offset)
      part_sizes = rings_to_parts[1:] - rings_to_parts[:-1]
      parts_map = cudf.Series(
          cp.arange(len(part_sizes)), name="part_index"
      ).repeat(part_sizes)
      parts_index_mapping_df = parts_map.reset_index(
          drop=True
      ).reset_index()
      # Map the length of each polygon in a similar fashion, then
      # join them below.
      parts_to_geoms = cp.array(lhs.polygons.geometry_offset)
      geometry_sizes = parts_to_geoms[1:] - parts_to_geoms[:-1]
      geometry_map = cudf.Series(
          cp.arange(len(geometry_sizes)), name="polygon_index"
      ).repeat(geometry_sizes)
      geom_index_mapping_df = geometry_map.reset_index(drop=True)
      geom_index_mapping_df.index.name = "part_index"
      geom_index_mapping_df = geom_index_mapping_df.reset_index()
      # Replace the part index with the polygon index by join
      part_result = parts_index_mapping_df.merge(
          point_result, on="part_index"
      )
      # Replace the polygon index with the row index by join
      return geom_index_mapping_df.merge(part_result, on="part_index")[
          ["polygon_index", "point_index"]
      ]
  
file_path: cuspatial/python/cuspatial/cuspatial/core/binpreds/contains_geometry_processor.py
imports: import cupy
  import cudf
  from cudf.core.dataframe import DataFrame
  from cudf.core.series import Series
  from cuspatial.core._column.geocolumn import GeoColumn
  from cuspatial.core.binpreds.binpred_interface import BinPred, PreprocessorResult
  from cuspatial.utils.binpred_utils import _count_results_in_multipoint_geometries, _false_series, _true_series
  from cuspatial.utils.column_utils import contains_only_linestrings, contains_only_multipoints, contains_only_polygons
label_desc: Use image node_id 2 for calling the ContainsGeometryProcessor obj's underlying member method code with example usage: obj._convert_quadtree_result_from_part_to_polygon_indices(lhs, point_result) and returns: geom_index_mapping_df