def METHOD_NAME(self, instance):
    server_xml = os.path.join(instance.conf_dir, 'server.xml')
    # Backup the file before modify
    self.backup(server_xml)
    # Parse the server.xml into an XML object
    document = etree.parse(server_xml, self.parser)
    # perform the upgrade in memory
    self.add_tls_range(document)
    # Once all changes are made, write the XML back into the same server.xml
    # This way we're preserving any other customization that has been done
    # to the server.xml
    with open(server_xml, 'wb') as f:
        document.write(f, pretty_print=True, encoding='utf-8')