code: def _count_results_in_multipoint_geometries(
      point_indices, point_result
  ):
      """Count the number of points in each multipoint geometry.
  
      Parameters
      ----------
      point_indices : cudf.Series
          The indices of the points in the original (rhs) GeoSeries.
      point_result : cudf.DataFrame
          The result of a contains_properly call.
  
      Returns
      -------
      cudf.Series
          The number of points that fell within a particular polygon id.
      cudf.Series
          The number of points in each multipoint geometry.
      """
      point_indices_df = cudf.Series(
          point_indices,
          name="rhs_index",
          index=cudf.RangeIndex(len(point_indices), name="point_index"),
      ).reset_index()
      with_rhs_indices = point_result.merge(
          point_indices_df, on="point_index"
      )
      # Because we are doing pairwise operations, we're only interested in the
      # results where polygon_index and rhs_index match
      pairwise_matches = with_rhs_indices[
          with_rhs_indices["polygon_index"]
          == with_rhs_indices["rhs_index"]
      ]
      points_grouped_by_original_polygon = pairwise_matches[
          ["point_index", "rhs_index"]
      ].drop_duplicates()
      hits = (
          points_grouped_by_original_polygon.groupby("rhs_index")
          .count()
          .sort_index()
      )
      expected_count = (
          point_indices_df.groupby("rhs_index").count().sort_index()
      )
      return hits, expected_count
  
imports: import cupy
  import numpy
  import cudf
  import cuspatial
  from cuspatial.core._column.geocolumn import ColumnType
  from cuspatial.core._column.geometa import Feature_Enum
label_desc: Use image node_id 5 for calling a global function with example usage: _count_results_in_multipoint_geometries(point_indices, point_result) and returns: hits,  expected_count