<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def config(self):
 """Create the finalized configuration"""

        root = etree.Element("xml")
        resource_records = etree.SubElement(root, "resource_records")

        # Append SOA and NS records
        resource_records.append(SOARecord()._etree)
        resource_records.append(NSRecord()._etree)

        # Append the rest
        for record in self._entries:
            resource_records.append(record._etree)

        return etree.tostring(root, encoding="utf-8",
                              pretty_print=True)