code: def DictToAdditionalPropertyMessage(properties, additional_property_type,
                                      sort_items=False):
      
      items = properties.items()
      if sort_items:
          items = sorted(items)
      map_ = []
      for key, value in items:
          map_.append(additional_property_type.AdditionalProperty(
              key=key, value=value))
      return additional_property_type(additionalProperties=map_)
docs: Convert the given dictionary to an AdditionalProperty message.