code: def __add_segment(self, segment):
          
          segment_id = self.ns+':'+segment.attrib['id']
          self.edus.append(segment_id)  # store RST segment in list of EDUs
  
          # A URML file can be tokenized, partially tokenized or not tokenized
          # at all. The "tokenized tokens" in the URML file will always be added
          # to the graph as nodes. The "untokenized tokens" will only be added,
          # if ``self.tokenize`` is ``True``.
  
          if is_segment_tokenized(segment):
              self.tokenized = True
              segment_text = sanitize_string(
                  ' '.join(e.text for e in segment if e.text is not None))
  
              for i, tok_elem in enumerate(segment):
                  tok = tok_elem.text
                  self.__add_token(segment_id, i, tok)
  
          else:  # is_segment_tokenized(segment) is False
              segment_text = sanitize_string(segment.text)
              segment_toks = segment_text.split()
  
              if self.tokenize:
                  self.tokenized = True
                  for i, tok in enumerate(segment_toks):
                      self.__add_token(segment_id, i, tok)
  
          segment_type = self.segment_types[segment_id]
          segment_label = get_segment_label(
              segment, segment_type, segment_text, self.ns, self.tokenize)
          self.add_node(
              segment_id, layers={self.ns, self.ns+':segment'},
              attr_dict={self.ns+':text' : segment_text,
                         'label':  segment_label})
docs: add attributes to segment nodes, as well as edges to/from other
          segments/groups. add segment to list of EDUs.
  
          Parameters
          ----------
          segment : ??? etree Element