def _ContainsComments(node):
 if isinstance(node, pytree.Leaf):
  return (node.type == grammar_token.COMMENT)
 for child in node.children:
  if _ContainsComments(child):
   return True
 return False

def _ContainsComments ( node ) : if isinstance ( node , pytree . Leaf ) : return ( node . type == grammar_token . COMMENT ) for child in node . children : if _ContainsComments ( child ) : return True return False
return true if the list has a comment in it .