code: def build_trials_response(trials: list):
      """
      Build the response representing a list of trials according to the API specification.
  
      Parameters
      ----------
      trials: list
          A list of :class:`orion.core.worker.trial.Trial`.
  
      Returns
      -------
      A JSON-serializable list of trials as defined in the API specification.
      """
      response = []
      for trial in trials:
          response.append({"id": trial.id})
      return response
  
file_path: orion/src/orion/serving/responses.py
imports: from typing import List
  from orion.benchmark import Benchmark
  from orion.core.worker.experiment import Experiment
  from orion.core.worker.trial import Trial
label_desc: Use image node_id 4 for calling a global function with example usage: build_trials_response(trials) and returns: response