def _single_starting_snapshot(session_resource_id, starting_snapshots):
  """Returns the single starting snapshot from a list of snapshot IDs.

  Args:
    session_resource_id: resource_id.FalkenResourceId for the session with the
      starting snapshots.
    starting_snapshots: List of snapshot IDs specified as starting snapshots
      for the session.

  Returns:
    Starting snapshot ID string.

  Raises:
    ValueError if the length of starting snapshots is not 1.
  """
  if len(starting_snapshots) != 1:
    raise ValueError(
        'Unexpected number of starting_snapshots, wanted exactly 1, got '
        f'{len(starting_snapshots)} for session {session_resource_id.session}.')
  return starting_snapshots[0]