code: def sorted_trajectories():
      ids = cp.random.randint(1, 400, 10000)
      timestamps = cp.random.random(10000) * 10000
      x = cp.random.random(10000)
      y = cp.random.random(10000)
      xy = cudf.DataFrame({"x": x, "y": y}).interleave_columns()
      points = cuspatial.GeoSeries.from_points_xy(xy)
      return cuspatial.derive_trajectories(ids, points, timestamps)
  
imports: import cupy
  import geopandas
  import numpy
  import pandas
  import pytest
  import pytest_cases
  from numba import cuda
  from shapely.geometry import LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon
  import cudf
  import cuspatial
label_desc: Use image node_id 8 for calling a global function with example usage: sorted_trajectories() and returns: cuspatial