class_docstr: Dispatches distance operations between two GeoSeries
class_docstr_tok: ["Dispatches","distance","operations","between","two","GeoSeries"]
code: def __call__(self):
      func, reverse, collection_types = type_to_func[
          (self._lhs_type, self._rhs_type)
      ]
      if reverse:
          dist = func(
              *collection_types, self._rhs_column, self._lhs_column
          )
      else:
          dist = func(
              *collection_types, self._lhs_column, self._rhs_column
          )
  
      # Rows with misaligned indices contains nan. Here we scatter the
      # distance values to the correct indices.
      result = full(
          len(self._res_index),
          float("nan"),
          dtype="float64",
      )
      scatter_map = as_column(
          range(len(self._res_index)), dtype="int32"
      ).apply_boolean_mask(self._non_null_mask)
  
      result[scatter_map] = dist
  
      # If `align==False`, geopandas preserves lhs index.
      index = None if self._align else self._res_index
  
      return cudf.Series(result, index=index, nan_as_null=False)
  
file_path: cuspatial/python/cuspatial/cuspatial/core/binops/distance_dispatch.py
imports: import cudf
  from cudf.core.column import as_column, full
  from cuspatial._lib.distance import pairwise_linestring_distance, pairwise_linestring_polygon_distance, pairwise_point_distance, pairwise_point_linestring_distance, pairwise_point_polygon_distance, pairwise_polygon_distance
  from cuspatial._lib.types import CollectionType
  from cuspatial.core._column.geometa import Feature_Enum
  from cuspatial.utils.column_utils import contains_only_linestrings, contains_only_multipoints, contains_only_points, contains_only_polygons
label_desc: Use image node_id 6 for calling the DistanceDispatch obj's underlying member method code with example usage: obj.__call__() and returns: cudf