nodes: 0, module; 1, function_definition; 2, function_name:list_formats; 3, parameters; 4, block; 5, identifier:self; 6, identifier:node; 7, default_parameter; 8, default_parameter; 9, expression_statement; 10, if_statement; 11, for_statement; 12, expression_statement; 13, return_statement; 14, identifier:path; 15, tuple; 16, identifier:formats; 17, None; 18, comment:"""
          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
          """; 19, comparison_operator:formats == None; 20, block; 21, identifier:child; 22, attribute; 23, block; 24, boolean_operator; 25, call; 26, identifier:formats; 27, None; 28, expression_statement; 29, identifier:node; 30, identifier:children; 31, expression_statement; 32, identifier:path; 33, call; 34, identifier:sorted; 35, argument_list; 36, assignment; 37, call; 38, attribute; 39, argument_list; 40, identifier:formats; 41, identifier:formats; 42, list; 43, attribute; 44, argument_list; 45, identifier:formats; 46, identifier:append; 47, call; 48, identifier:self; 49, identifier:list_formats; 50, identifier:child; 51, binary_operator:path + (child.name,); 52, identifier:formats; 53, attribute; 54, argument_list; 55, identifier:path; 56, tuple; 57, string:"."; 58, identifier:join; 59, identifier:path; 60, attribute; 61, identifier:child; 62, identifier:name
code: 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)