code: def _find_latest_versions(experiments):
      """Find the latest versions of the experiments"""
      leaf_experiments = {}
      for experiment in experiments:
          name = experiment["name"]
          version = experiment["version"]
  
          if name in leaf_experiments:
              leaf_experiments[name] = max(
                  leaf_experiments[name], version
              )
          else:
              leaf_experiments[name] = version
      return leaf_experiments
  
file_path: orion/src/orion/serving/experiments_resource.py
imports: import json
  from typing import Optional
  from falcon import Request, Response
  from orion.core.worker.experiment import Experiment
  from orion.core.worker.trial import Trial
  from orion.serving.parameters import retrieve_experiment, verify_query_parameters
  from orion.serving.responses import build_experiment_response, build_experiments_response
label_desc: Use image node_id 1 for calling a global function with example usage: _find_latest_versions(experiments) and returns: leaf_experiments