<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def list_formats(self, node, path=(), formats=None):
 """ Lists the object formats in sorted order. :param node: Root node to start listing the formats from. :type node: AbstractCompositeNode :param path: Walked paths. :type path: tuple :param formats: Formats. :type formats: list :return: Formats. :rtype: list """


        if formats == None:
            formats = []

        for child in node.children:
            self.list_formats(child, path + (child.name,), formats)
        path and formats.append(".".join(path))
        return sorted(formats)