code: def test_derive_trajectories_many():
      np.random.seed(0)
      object_id = cudf.Series(
          np.random.randint(0, 10, 10), dtype="int32"
      )
      xs = cudf.Series(np.random.randint(0, 10, 10).astype("f8"))
      ys = cudf.Series(np.random.randint(0, 10, 10).astype("f8"))
      points = cuspatial.GeoSeries.from_points_xy(
          cudf.DataFrame({"x": xs, "y": ys}).interleave_columns()
      )
      timestamp = cudf.Series(np.random.randint(0, 10, 10))
      objects, traj_offsets = cuspatial.derive_trajectories(
          object_id, points, timestamp
      )
  
      sorted_idxs = cudf.DataFrame(
          {"id": object_id, "ts": timestamp}
      ).argsort()
      cudf.testing.assert_series_equal(
          traj_offsets,
          cudf.Series([0, 1, 2, 5, 6, 8, 9], dtype="int32"),
      )
      cudf.testing.assert_frame_equal(
          objects,
          cudf.DataFrame(
              {
                  "object_id": object_id.sort_values().reset_index(
                      drop=True
                  ),
                  "x": xs.take(sorted_idxs)
                  .reset_index(drop=True)
                  .astype("float64"),
                  "y": ys.take(sorted_idxs)
                  .reset_index(drop=True)
                  .astype("float64"),
                  "timestamp": timestamp.take(sorted_idxs)
                  .reset_index(drop=True)
                  .astype("datetime64[ms]"),
              },
              index=cudf.core.index.RangeIndex(0, 10),
          ),
      )
  
imports: import numpy
  import pytest
  from shapely.geometry import Point
  import cudf
  import cuspatial
label_desc: Use image node_id 13 for calling a global function with example usage: test_derive_trajectories_many() without return types