code: def gen_relations(self):
          
          relations_elem = E('relations')
          for relname in sorted(self.relations):
              relations_elem.append(
                  E('rel', OrderedDict([('name', relname), ('type', self.relations[relname])])))
          return relations_elem
docs: Create the <relations> etree element of an RS3 file.
          This represents all relation types (both 'rst' and 'multinuc').
  
          Example relation:
              <rel name="circumstance" type="rst" />