code: def render(self, is_unicode=False, pretty_print=False):
          
          for f in self.graph.xml_filters:
              self.root = f(self.root)
          args = {'encoding': 'utf-8'}
  
          svg = b''
          if etree.lxml:
              args['pretty_print'] = pretty_print
  
          if not self.graph.disable_xml_declaration:
              svg = b"<?xml version='1.0' encoding='utf-8'?>\n"
  
          if not self.graph.disable_xml_declaration:
              svg += b'\n'.join([
                  etree.tostring(pi, **args)
                  for pi in self.processing_instructions
              ])
  
          svg += etree.tostring(self.root, **args)
  
          if self.graph.disable_xml_declaration or is_unicode:
              svg = svg.decode('utf-8')
          return svg
docs: Last thing to do before rendering