def _VisitCompoundStatement(self, node, substatement_names):
    for child in node.children:
      # A pytree is structured in such a way that a single 'if_stmt' node will
      # contain all the 'if', 'elif' and 'else' nodes as children (similar
      # structure applies to 'while' statements, 'try' blocks, etc). Therefore,
      # we visit all children here and create a new line before the requested
      # set of nodes.
      if (child.type == grammar_token.NAME and
          child.value in substatement_names):
        self._StartNewLine()
      self.Visit(child)
Helper for visiting compound statements.
dataset/ETHPy150Open google/yapf/yapf/yapflib/pytree_unwrapper.py/PyTreeUnwrapper._VisitCompoundStatement