docstr: Linestrings can be compared either forward or reversed. We need
  to compare both directions.
docstr_tok: ["Linestrings","can","be","compared","either","forward","or","reversed",".","We","need","to","compare","both","directions","."]
code: def _compute_predicate(self, lhs, rhs, preprocessor_result):
      """Linestrings can be compared either forward or reversed. We need
      to compare both directions."""
      lengths_equal = self._offset_equals(
          lhs.lines.part_offset, rhs.lines.part_offset
      )
      lhs_lengths_equal = lhs[lengths_equal]
      rhs_lengths_equal = rhs[lengths_equal]
      lhs_reversed = self._reverse_linestrings(
          lhs_lengths_equal.lines.xy,
          lhs_lengths_equal.lines.part_offset,
      )
      forward_result = self._vertices_equals(
          lhs_lengths_equal.lines.xy, rhs_lengths_equal.lines.xy
      )
      reverse_result = self._vertices_equals(
          lhs_reversed, rhs_lengths_equal.lines.xy
      )
      result = forward_result | reverse_result
      original_point_indices = cudf.Series(
          lhs_lengths_equal.point_indices
      ).replace(cudf.Series(lhs_lengths_equal.index))
      return self._postprocess(
          lhs, rhs, EqualsOpResult(result, original_point_indices)
      )
  
imports: from __future__ import annotations
  from typing import Generic, TypeVar
  import cupy
  import cudf
  from cudf import Series
  import cuspatial
  from cuspatial.core.binpreds.binpred_interface import BinPred, EqualsOpResult, ImpossiblePredicate, NotImplementedPredicate, PreprocessorResult
  from cuspatial.utils.binpred_utils import LineString, MultiPoint, Point, Polygon, _false_series
label_desc: Use image node_id 1 for calling the LineStringLineStringEquals obj's underlying member method code with example usage: obj._compute_predicate(lhs, rhs, preprocessor_result) and returns: self