parameters: (cls_node)
docstring: one-line classes don't get a suite in the parse tree so we add
          one to normalize the tree
docstring_summary: one-line classes don't get a suite in the parse tree so we add
          one to normalize the tree
docstring_tokens: one - line classes don t get a suite in the parse tree so we add one to normalize the tree
function: def fixup_parse_tree(cls_node):
      """ one-line classes don't get a suite in the parse tree so we add
          one to normalize the tree
      """
      for node in cls_node.children:
          if node.type == syms.suite:
              # already in the preferred format, do nothing
              return
  
      # !%@#! oneliners have no suite node, we have to fake one up
      for i, node in enumerate(cls_node.children):
          if node.type == token.COLON:
              break
      else:
          raise ValueError("No class suite and no ':'!")
  
      # move everything into a suite node
      suite = Node(syms.suite, [])
      while cls_node.children[i+1:]:
          move_node = cls_node.children[i+1]
          suite.append_child(move_node.clone())
          move_node.remove()
      cls_node.append_child(suite)
      node = suite
function_tokens: def fixup_parse_tree ( cls_node ) : for node in cls_node . children : if node . type == syms . suite : # already in the preferred format, do nothing return # !%@#! oneliners have no suite node, we have to fake one up for i , node in enumerate ( cls_node . children ) : if node . type == token . COLON : break else : raise ValueError ( "No class suite and no ':'!" ) # move everything into a suite node suite = Node ( syms . suite , [ ] ) while cls_node . children [ i + 1 : ] : move_node = cls_node . children [ i + 1 ] suite . append_child ( move_node . clone ( ) ) move_node . remove ( ) cls_node . append_child ( suite ) node = suite