class_docstr: Base class for binary predicates. This class is an abstract base class
  and can not be instantiated directly. `BinPred` is the base class that
  implements this interface in the most general case. Child classes exist
  for each combination of left-hand and right-hand GeoSeries types and binary
  predicates. For example, a `PointPointContains` predicate is a child class
  of `BinPred` that implements the `contains_properly` predicate for two
  `Point` GeoSeries. These classes are found in the `feature_<predicateName>`
  files found in this directory.
  
  Notes
  -----
  BinPred classes are selected using the appropriate dispatch function. For
  example, the `contains_properly` predicate is selected using the
  `CONTAINS_DISPATCH` dispatch function from `binpred_dispatch.py`. The
  dispatch function selects the appropriate BinPred class based on the
  left-hand and right-hand GeoSeries types.
  
  This enables customized behavior for each combination of left-hand and
  right-hand GeoSeries types and binary predicates. For example, the
  `contains_properly` predicate for two `Point` GeoSeries is implemented
  using a `PointPointContains` BinPred class. The `contains_properly`
  predicate for a `Point` GeoSeries and a `Polygon` GeoSeries is implemented
  using a `PointPolygonContains` BinPred class. Most subclasses will be able
  to use all or 2/3rds of the methods defined in the `RootContains(BinPred)
  class`.
  
  The `RootContains` class implements the `contains_properly` predicate for
  the most common combination of left-hand and right-hand GeoSeries types.
  The `RootContains` class can be used as a template for implementing the
  `contains_properly` predicate for other combinations of left-hand and
  right-hand GeoSeries types.
  
  Examples
  --------
  >>> from cuspatial.core.binpreds.binpred_dispatch import CONTAINS_DISPATCH
  >>> from cuspatial.core.geoseries import GeoSeries
  >>> from shapely.geometry import Point, Polygon
  >>> predicate = CONTAINS_DISPATCH[(
  ...     lhs.column_type, rhs.column_type
  ... )](align=True, allpairs=False)
  >>> lhs = GeoSeries([Polygon([(0, 0), (1, 1), (1, 0)])])
  >>> rhs = GeoSeries([Point(0, 0), Point(1, 1)])
  >>> print(predicate(lhs, rhs))
  0    False
  dtype: bool
class_docstr_tok: ["Base","class","for","binary","predicates",".","This","class","is","an","abstract","base","class","and","can","not","be","instantiated","directly",".","`","BinPred","`","is","the","base","class","that","implements","this","interface","in","the","most","general","case",".","Child","classes","exist","for","each","combination","of","left-hand","and","right-hand","GeoSeries","types","and","binary","predicates",".","For","example",",","a","`","PointPointContains","`","predicate","is","a","child","class","of","`","BinPred","`","that","implements","the","`","contains_properly","`","predicate","for","two","`","Point","`","GeoSeries",".","These","classes","are","found","in","the","`","feature_","<","predicateName",">","`","files","found","in","this","directory",".","Notes","--","--","-","BinPred","classes","are","selected","using","the","appropriate","dispatch","function",".","For","example",",","the","`","contains_properly","`","predicate","is","selected","using","the","`","CONTAINS_DISPATCH","`","dispatch","function","from","`","binpred_dispatch.py","`",".","The","dispatch","function","selects","the","appropriate","BinPred","class","based","on","the","left-hand","and","right-hand","GeoSeries","types",".","This","enables","customized","behavior","for","each","combination","of","left-hand","and","right-hand","GeoSeries","types","and","binary","predicates",".","For","example",",","the","`","contains_properly","`","predicate","for","two","`","Point","`","GeoSeries","is","implemented","using","a","`","PointPointContains","`","BinPred","class",".","The","`","contains_properly","`","predicate","for","a","`","Point","`","GeoSeries","and","a","`","Polygon","`","GeoSeries","is","implemented","using","a","`","PointPolygonContains","`","BinPred","class",".","Most","subclasses","will","be","able","to","use","all","or","2\/3rds","of","the","methods","defined","in","the","`","RootContains","(","BinPred",")","class","`",".","The","`","RootContains","`","class","implements","the","`","contains_properly","`","predicate","for","the","most","common","combination","of","left-hand","and","right-hand","GeoSeries","types",".","The","`","RootContains","`","class","can","be","used","as","a","template","for","implementing","the","`","contains_properly","`","predicate","for","other","combinations","of","left-hand","and","right-hand","GeoSeries","types",".","Examples","--","--","--","--",">",">",">","from","cuspatial.core.binpreds.binpred_dispatch","import","CONTAINS_DISPATCH",">",">",">","from","cuspatial.core.geoseries","import","GeoSeries",">",">",">","from","shapely.geometry","import","Point",",","Polygon",">",">",">","predicate","=","CONTAINS_DISPATCH","[","(","...","lhs.column_type",",","rhs.column_type","...",")","]","(","align=True",",","allpairs=False",")",">",">",">","lhs","=","GeoSeries","(","[","Polygon","(","[","(","0",",","0",")",",","(","1",",","1",")",",","(","1",",","0",")","]",")","]",")",">",">",">","rhs","=","GeoSeries","(","[","Point","(","0",",","0",")",",","Point","(","1",",","1",")","]",")",">",">",">","print","(","predicate","(","lhs",",","rhs",")",")","0","False","dtype",":","bool"]
docstr: Postprocess the output GeoSeries to ensure that they are of the
  correct return type for the predicate. This method is implemented by
  the subclass.
  
  Postprocessing is used to convert the results of the
  `_compute_predicate` call into countable values. This step converts the
  results of one of the three binary predicates `contains`, `intersects`,
  or `equals` into a `Series` of boolean values. When the `rhs` is a
  non-point type, `_postprocess` is responsible for aggregating the
  results of the `_compute_predicate` call into a single boolean value
  for each feature in the `lhs`.
  
  Parameters
  ----------
  lhs : GeoSeries
      The left-hand GeoSeries.
  rhs : GeoSeries
      The right-hand GeoSeries.
  op_result : cudf.Series
      The result of the `_compute_predicate` call.
  
  Returns
  -------
  result : Series
      A Series of boolean values indicating whether each feature in
      the right-hand GeoSeries satisfies the requirements of a binary
      predicate with its corresponding feature in the left-hand
      GeoSeries.
  
  Notes
  -----
  Arithmetic rules incorporated into `_postprocess` classes:
  
  (a, b) -> a contains b iff for all points p in b, p is in a
  (a, b) -> a intersects b iff for any point p in b, p is in a
  
  I'm currently looking into refactoring these arithmetics into a
  syntax that more closely resembles it.
docstr_tok: ["Postprocess","the","output","GeoSeries","to","ensure","that","they","are","of","the","correct","return","type","for","the","predicate",".","This","method","is","implemented","by","the","subclass",".","Postprocessing","is","used","to","convert","the","results","of","the","`","_compute_predicate","`","call","into","countable","values",".","This","step","converts","the","results","of","one","of","the","three","binary","predicates","`","contains","`",",","`","intersects","`",",","or","`","equals","`","into","a","`","Series","`","of","boolean","values",".","When","the","`","rhs","`","is","a","non-point","type",",","`","_postprocess","`","is","responsible","for","aggregating","the","results","of","the","`","_compute_predicate","`","call","into","a","single","boolean","value","for","each","feature","in","the","`","lhs","`",".","Parameters","--","--","--","--","--","lhs",":","GeoSeries","The","left-hand","GeoSeries",".","rhs",":","GeoSeries","The","right-hand","GeoSeries",".","op_result",":","cudf.Series","The","result","of","the","`","_compute_predicate","`","call",".","Returns","--","--","--","-","result",":","Series","A","Series","of","boolean","values","indicating","whether","each","feature","in","the","right-hand","GeoSeries","satisfies","the","requirements","of","a","binary","predicate","with","its","corresponding","feature","in","the","left-hand","GeoSeries",".","Notes","--","--","-","Arithmetic","rules","incorporated","into","`","_postprocess","`","classes",":","(","a",",","b",")","-",">","a","contains","b","iff","for","all","points","p","in","b",",","p","is","in","a","(","a",",","b",")","-",">","a","intersects","b","iff","for","any","point","p","in","b",",","p","is","in","a","I","'m","currently","looking","into","refactoring","these","arithmetics","into","a","syntax","that","more","closely","resembles","it","."]
code: def _postprocess(
      self,
      lhs: "GeoSeries",
      rhs: "GeoSeries",
      op_result: OpResult,
  ) -> Series:
      """Postprocess the output GeoSeries to ensure that they are of the
      correct return type for the predicate. This method is implemented by
      the subclass.
  
      Postprocessing is used to convert the results of the
      `_compute_predicate` call into countable values. This step converts the
      results of one of the three binary predicates `contains`, `intersects`,
      or `equals` into a `Series` of boolean values. When the `rhs` is a
      non-point type, `_postprocess` is responsible for aggregating the
      results of the `_compute_predicate` call into a single boolean value
      for each feature in the `lhs`.
  
      Parameters
      ----------
      lhs : GeoSeries
          The left-hand GeoSeries.
      rhs : GeoSeries
          The right-hand GeoSeries.
      op_result : cudf.Series
          The result of the `_compute_predicate` call.
  
      Returns
      -------
      result : Series
          A Series of boolean values indicating whether each feature in
          the right-hand GeoSeries satisfies the requirements of a binary
          predicate with its corresponding feature in the left-hand
          GeoSeries.
  
      Notes
      -----
      Arithmetic rules incorporated into `_postprocess` classes:
  
      (a, b) -> a contains b iff for all points p in b, p is in a
      (a, b) -> a intersects b iff for any point p in b, p is in a
  
      I'm currently looking into refactoring these arithmetics into a
      syntax that more closely resembles it.
      """
      raise NotImplementedError
  
imports: from typing import TYPE_CHECKING, Tuple
  from cudf import Series
  from cuspatial.utils.binpred_utils import _false_series
label_desc: Use image node_id 6 for calling the BinPred obj's underlying member method code with example usage: obj._postprocess(lhs, rhs, op_result) without return types