code: def test_trajectory_distances_and_speeds_single_trajectory():
      x = cudf.Series(
          [1.0, 2.0, 3.0, 5.0, 7.0, 1.0, 2.0, 3.0, 6.0, 0.0, 3.0, 6.0]
      )  # xs
      y = cudf.Series(
          [0.0, 1.0, 2.0, 3.0, 1.0, 3.0, 5.0, 6.0, 5.0, 4.0, 7.0, 4.0]
      )  # ys
  
      points = cuspatial.GeoSeries.from_points_xy(
          cudf.DataFrame({"x": x, "y": y}).interleave_columns()
      )
  
      objects, traj_offsets = cuspatial.derive_trajectories(
          [0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2],  # object_id
          points,
          [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],  # timestamp
      )
      trajs = cuspatial.GeoSeries.from_points_xy(
          objects[["x", "y"]].interleave_columns()
      )
      result = cuspatial.trajectory_distances_and_speeds(
          len(traj_offsets),
          objects["object_id"],
          trajs,
          objects["timestamp"],
      )
      cudf.testing.assert_series_equal(
          result["distance"],
          cudf.Series([7892.922363, 6812.55908203125, 8485.28125]),
          check_names=False,
      )
      cudf.testing.assert_series_equal(
          result["speed"],
          cudf.Series([1973230.625, 2270853.0, 4242640.5]),
          check_names=False,
      )
  
imports: import numpy
  import pytest
  from shapely.geometry import Point
  import cudf
  import cuspatial
label_desc: Use image node_id 18 for calling a global function with example usage: test_trajectory_distances_and_speeds_single_trajectory() without return types