def GetFirst(parameters, key, default=None):
  """Returns the first value of the given key.

  Args:
    parameters: A dictionary of lists, {key: [value1, value2]}
    key: name of parameter to retrieve
    default: value to return if the key isn't found

  Returns:
    The first value in the list, or default.
  """
  if key in parameters:
    if parameters[key]:
      return parameters[key][0]
  return default