tools/traffic_annotation/scripts/update_annotations_doc.py
def _insert_placeholders(self, placeholders):
    """Placeholders (e.g. groups, senders, traffic annotations) are inserted in
    the document in their order of appearance.

    Increment the self.index value to ensure that placeholders are inserted at
    the correct locations. Because placeholders are sorted in order of
    appearance, self.index is strictly increasing.
    """
    reqs = []
    for placeholder in placeholders:
      placeholder_type = placeholder["type"]

      if placeholder_type == Placeholder.ANNOTATION:
        req, index = self._create_annotation_request(
            placeholder["traffic_annotation"],
            self.index,
            color=self._color_bool)
        self._color_bool = not self._color_bool
      else:
        # is either a group or sender placeholder
        req, index = self._create_group_or_sender_request(
            placeholder["name"], self.index, placeholder_type)

      reqs += req
      self.index += index

    status = self._perform_requests(reqs)
    print("Added all {} placeholders!\n".format(len(placeholders)))
Placeholders (e.g. groups, senders, traffic annotations) are inserted in
    the document in their order of appearance.

    Increment the self.index value to ensure that placeholders are inserted at
    the correct locations. Because placeholders are sorted in order of
    appearance, self.index is strictly increasing.
    
Placeholders  are inserted in
the document in their order of appearance.

Increment the self.index value to ensure that placeholders are inserted at
the correct locations. Because placeholders are sorted in order of
appearance, self.index is strictly increasing.
Placeholders are inserted in the document in their order of appearance . Increment the self . index value to ensure that placeholders are inserted at the correct locations . Because placeholders are sorted in order of appearance self . index is strictly increasing .
def _insert_placeholders(self, placeholders):
    reqs = []
    for placeholder in placeholders:
      placeholder_type = placeholder["type"]
      if placeholder_type == Placeholder.ANNOTATION:
        req, index = self._create_annotation_request(
            placeholder["traffic_annotation"],
            self.index,
            color=self._color_bool)
        self._color_bool = not self._color_bool
      else:
        req, index = self._create_group_or_sender_request(
            placeholder["name"], self.index, placeholder_type)
      reqs += req
      self.index += index
    status = self._perform_requests(reqs)
    print("Added all {} placeholders!\n".format(len(placeholders)))
def _insert_placeholders ( self , placeholders ) : reqs = [ ] for placeholder in placeholders : placeholder_type = placeholder [ "type" ] if placeholder_type == Placeholder . ANNOTATION : req , index = self . _create_annotation_request ( placeholder [ "traffic_annotation" ] , self . index , color = self . _color_bool ) self . _color_bool = not self . _color_bool else : req , index = self . _create_group_or_sender_request ( placeholder [ "name" ] , self . index , placeholder_type ) reqs += req self . index += index status = self . _perform_requests ( reqs ) print ( "Added all {} placeholders!\n" . format ( len ( placeholders ) ) )
Placeholders (e.g.
Placeholders ( e . g .
"""Placeholders (e.g. groups, senders, traffic annotations) are inserted in
    the document in their order of appearance.

    Increment the self.index value to ensure that placeholders are inserted at
    the correct locations. Because placeholders are sorted in order of
    appearance, self.index is strictly increasing.
    """ # is either a group or sender placeholder
self
placeholders