def _DetermineMustSplitAnnotation(node):
 if (not _ContainsComments(node)):
  if (sum((1 for ch in node.children if (pytree_utils.NodeName(ch) == 'COMMA'))) < 2):
   return
  if ((not isinstance(node.children[(-1)], pytree.Leaf)) or (node.children[(-1)].value != ',')):
   return
 num_children = len(node.children)
 index = 0
 _SetMustSplitOnFirstLeaf(node.children[0])
 while (index < (num_children - 1)):
  child = node.children[index]
  if (isinstance(child, pytree.Leaf) and (child.value == ',')):
   next_child = node.children[(index + 1)]
   if (next_child.type == grammar_token.COMMENT):
    index += 1
    if (index >= (num_children - 1)):
     break
   _SetMustSplitOnFirstLeaf(node.children[(index + 1)])
  index += 1

def _DetermineMustSplitAnnotation ( node ) : if ( not _ContainsComments ( node ) ) : if ( sum ( ( 1 for ch in node . children if ( pytree_utils . NodeName ( ch ) == 'COMMA' ) ) ) < 2 ) : return if ( ( not isinstance ( node . children [ ( - 1 ) ] , pytree . Leaf ) ) or ( node . children [ ( - 1 ) ] . value != ',' ) ) : return num_children = len ( node . children ) index = 0 _SetMustSplitOnFirstLeaf ( node . children [ 0 ] ) while ( index < ( num_children - 1 ) ) : child = node . children [ index ] if ( isinstance ( child , pytree . Leaf ) and ( child . value == ',' ) ) : next_child = node . children [ ( index + 1 ) ] if ( next_child . type == grammar_token . COMMENT ) : index += 1 if ( index >= ( num_children - 1 ) ) : break _SetMustSplitOnFirstLeaf ( node . children [ ( index + 1 ) ] ) index += 1
enforce a split in the list if the list ends with a comma .