def ApToDict(aps) -> dict:
  """Convert list of AdditionalProperty messages to dict.

  aps.additionalProperties is an iterable protorpclite.messages.FieldList
  type of some messages (usually of type AdditionalProperties), which
  have a 'key' and a 'value' attributes. Returned is the dict of these
  key-value pairs.

  If aps tests False, an empty dict() is returned.
  """
  return {x.key:x.value for x in aps.additionalProperties} if aps else {}