code: def directed_hausdorff_distance(multipoints: GeoSeries):
      """Compute the directed Hausdorff distances between all pairs of
      spaces.
  
      Parameters
      ----------
      multipoints: GeoSeries
          A column of multipoint, where each multipoint indicates an input space
          to compute its hausdorff distance to the rest of input spaces.
  
      Returns
      -------
      result : cudf.DataFrame
          result[i, j] indicates the hausdorff distance between multipoints[i]
          and multipoint[j].
  
      Examples
      --------
      The directed Hausdorff distance from one space to another is the greatest
      of all the distances between any point in the first space to the closest
      point in the second.
  
      `Wikipedia <https://en.wikipedia.org/wiki/Hausdorff_distance>`_
  
      Consider a pair of lines on a grid::
  
               :
               x
          -----xyy---
               :
               :
  
      x\\ :sub:`0` = (0, 0), x\\ :sub:`1` = (0, 1)
  
      y\\ :sub:`0` = (1, 0), y\\ :sub:`1` = (2, 0)
  
      x\\ :sub:`0` is the closest point in ``x`` to ``y``. The distance from
      x\\ :sub:`0` to the farthest point in ``y`` is 2.
  
      y\\ :sub:`0` is the closest point in ``y`` to ``x``. The distance from
      y\\ :sub:`0` to the farthest point in ``x`` is 1.414.
  
      Compute the directed hausdorff distances between a set of spaces
  
      >>> pts = cuspatial.GeoSeries([
      ...     MultiPoint([(0, 0), (1, 0)]),
      ...     MultiPoint([(0, 1), (0, 2)])
      ... ])
      >>> cuspatial.directed_hausdorff_distance(pts)
          0         1
      0  0.0  1.414214
      1  2.0  0.000000
      """
  
      num_spaces = len(multipoints)
      if num_spaces == 0:
          return DataFrame([])
  
      if not contains_only_multipoints(multipoints):
          raise ValueError("Input must be a series of multipoints.")
  
      result = cpp_directed_hausdorff_distance(
          multipoints.multipoints.x._column,
          multipoints.multipoints.y._column,
          as_column(multipoints.multipoints.geometry_offset[:-1]),
      )
  
      return DataFrame._from_columns(result, range(num_spaces))
  
file_path: cuspatial/python/cuspatial/cuspatial/core/spatial/distance.py
imports: import cudf
  from cudf import DataFrame, Series
  from cudf.core.column import as_column
  from cuspatial._lib.distance import directed_hausdorff_distance, haversine_distance, 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.geoseries import GeoSeries
  from cuspatial.utils.column_utils import contains_only_linestrings, contains_only_multipoints, contains_only_points, contains_only_polygons
label_desc: Use image node_id 1 for calling a global function with example usage: directed_hausdorff_distance(multipoints) and returns: DataFrame, DataFrame