docstr: Reconstruct the original geometry from the result of the
  contains_properly call.
  
  Parameters
  ----------
  lhs : GeoSeries
      The left-hand side of the binary predicate.
  rhs : GeoSeries
      The right-hand side of the binary predicate.
  preprocessor_result : PreprocessorResult
      The result of the preprocessor.
  op_result : ContainsProperlyOpResult
      The result of the contains_properly call.
  mode : str
      The mode of the predicate. Various mode options are available
      to support binary predicates. The mode options are `full`,
      `basic_none`, `basic_any`, and `basic_count`. If the default
      option `full` is specified, `.contains` or .contains_properly`
      will return a boolean series indicating whether each feature
      in the right-hand GeoSeries is contained by the corresponding
      feature in the left-hand GeoSeries. If `basic_none` is
      specified, `.contains` or .contains_properly` returns the
      negation of `basic_any`.`. If `basic_any` is specified, `.contains`
      or `.contains_properly` returns a boolean series indicating
      whether any point in the right-hand GeoSeries is contained by
      the corresponding feature in the left-hand GeoSeries. If the
      `basic_count` option is specified, `.contains` or
      .contains_properly` returns a Series of integers indicating
      the number of points in the right-hand GeoSeries that are
      contained by the corresponding feature in the left-hand GeoSeries.
  
  Returns
  -------
  cudf.Series
      A boolean series indicating whether each feature in the
      right-hand GeoSeries satisfies the requirements of the point-
      in-polygon basic predicate with its corresponding feature in the
      left-hand GeoSeries.
docstr_tok: ["Reconstruct","the","original","geometry","from","the","result","of","the","contains_properly","call",".","Parameters","--","--","--","--","--","lhs",":","GeoSeries","The","left-hand","side","of","the","binary","predicate",".","rhs",":","GeoSeries","The","right-hand","side","of","the","binary","predicate",".","preprocessor_result",":","PreprocessorResult","The","result","of","the","preprocessor",".","op_result",":","ContainsProperlyOpResult","The","result","of","the","contains_properly","call",".","mode",":","str","The","mode","of","the","predicate",".","Various","mode","options","are","available","to","support","binary","predicates",".","The","mode","options","are","`","full","`",",","`","basic_none","`",",","`","basic_any","`",",","and","`","basic_count","`",".","If","the","default","option","`","full","`","is","specified",",","`",".contains","`","or",".contains_properly","`","will","return","a","boolean","series","indicating","whether","each","feature","in","the","right-hand","GeoSeries","is","contained","by","the","corresponding","feature","in","the","left-hand","GeoSeries",".","If","`","basic_none","`","is","specified",",","`",".contains","`","or",".contains_properly","`","returns","the","negation","of","`","basic_any","`",".","`",".","If","`","basic_any","`","is","specified",",","`",".contains","`","or","`",".contains_properly","`","returns","a","boolean","series","indicating","whether","any","point","in","the","right-hand","GeoSeries","is","contained","by","the","corresponding","feature","in","the","left-hand","GeoSeries",".","If","the","`","basic_count","`","option","is","specified",",","`",".contains","`","or",".contains_properly","`","returns","a","Series","of","integers","indicating","the","number","of","points","in","the","right-hand","GeoSeries","that","are","contained","by","the","corresponding","feature","in","the","left-hand","GeoSeries",".","Returns","--","--","--","-","cudf.Series","A","boolean","series","indicating","whether","each","feature","in","the","right-hand","GeoSeries","satisfies","the","requirements","of","the","point-","in-polygon","basic","predicate","with","its","corresponding","feature","in","the","left-hand","GeoSeries","."]
code: def _postprocess_multipoint_rhs(
      self, lhs, rhs, preprocessor_result, op_result, mode
  ):
      """Reconstruct the original geometry from the result of the
      contains_properly call.
  
      Parameters
      ----------
      lhs : GeoSeries
          The left-hand side of the binary predicate.
      rhs : GeoSeries
          The right-hand side of the binary predicate.
      preprocessor_result : PreprocessorResult
          The result of the preprocessor.
      op_result : ContainsProperlyOpResult
          The result of the contains_properly call.
      mode : str
          The mode of the predicate. Various mode options are available
          to support binary predicates. The mode options are `full`,
          `basic_none`, `basic_any`, and `basic_count`. If the default
          option `full` is specified, `.contains` or .contains_properly`
          will return a boolean series indicating whether each feature
          in the right-hand GeoSeries is contained by the corresponding
          feature in the left-hand GeoSeries. If `basic_none` is
          specified, `.contains` or .contains_properly` returns the
          negation of `basic_any`.`. If `basic_any` is specified, `.contains`
          or `.contains_properly` returns a boolean series indicating
          whether any point in the right-hand GeoSeries is contained by
          the corresponding feature in the left-hand GeoSeries. If the
          `basic_count` option is specified, `.contains` or
          .contains_properly` returns a Series of integers indicating
          the number of points in the right-hand GeoSeries that are
          contained by the corresponding feature in the left-hand GeoSeries.
  
      Returns
      -------
      cudf.Series
          A boolean series indicating whether each feature in the
          right-hand GeoSeries satisfies the requirements of the point-
          in-polygon basic predicate with its corresponding feature in the
          left-hand GeoSeries."""
  
      point_indices = preprocessor_result.point_indices
      allpairs_result = self._reindex_allpairs(lhs, op_result)
      if isinstance(allpairs_result, Series):
          return allpairs_result
      # Hits is the number of calculated points in each polygon
      # Expected count is the sizes of the features in the right-hand
      # GeoSeries
      (
          hits,
          expected_count,
      ) = _count_results_in_multipoint_geometries(
          point_indices, allpairs_result
      )
      result_df = hits.reset_index().merge(
          expected_count.reset_index(), on="rhs_index"
      )
      # Handling for the basic predicates
      if mode == "basic_none":
          none_result = _true_series(len(rhs))
          if len(result_df) == 0:
              return none_result
          none_result.loc[result_df["point_index_x"] > 0] = False
          return none_result
      elif mode == "basic_any":
          any_result = _false_series(len(rhs))
          if len(result_df) == 0:
              return any_result
          indexes = result_df["rhs_index"][
              result_df["point_index_x"] > 0
          ]
          any_result.iloc[indexes] = True
          return any_result
      elif mode == "basic_count":
          count_result = cudf.Series(cp.zeros(len(rhs)), dtype="int32")
          if len(result_df) == 0:
              return count_result
          hits = result_df["point_index_x"]
          hits.index = count_result.iloc[result_df["rhs_index"]].index
          count_result.iloc[result_df["rhs_index"]] = hits
          return count_result
  
      # Handling for full contains (equivalent to basic predicate all)
      # for each input pair i: result[i] =  true iff point[i] is
      # contained in at least one polygon of multipolygon[i].
      result_df["feature_in_polygon"] = (
          result_df["point_index_x"] >= result_df["point_index_y"]
      )
      final_result = _false_series(len(rhs))
      final_result.loc[
          result_df["rhs_index"][result_df["feature_in_polygon"]]
      ] = True
      return final_result
  
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 4 for calling the ContainsGeometryProcessor obj's underlying member method code with example usage: obj._postprocess_multipoint_rhs(lhs, rhs, preprocessor_result, op_result, mode) and returns: final_result, allpairs_result, none_result, none_result, any_result, any_result, count_result, count_result