def _shorten_line_at_tokens_new(tokens, source, indentation, max_line_length):
 (yield (indentation + source))
 parsed_tokens = _parse_tokens(tokens)
 if parsed_tokens:
  fixed = _reflow_lines(parsed_tokens, indentation, max_line_length, start_on_prefix_line=True)
  if (fixed and check_syntax(normalize_multiline(fixed.lstrip()))):
   (yield fixed)
  fixed = _reflow_lines(parsed_tokens, indentation, max_line_length, start_on_prefix_line=False)
  if (fixed and check_syntax(normalize_multiline(fixed.lstrip()))):
   (yield fixed)

def _shorten_line_at_tokens_new ( tokens , source , indentation , max_line_length ) : ( yield ( indentation + source ) ) parsed_tokens = _parse_tokens ( tokens ) if parsed_tokens : fixed = _reflow_lines ( parsed_tokens , indentation , max_line_length , start_on_prefix_line = True ) if ( fixed and check_syntax ( normalize_multiline ( fixed . lstrip ( ) ) ) ) : ( yield fixed ) fixed = _reflow_lines ( parsed_tokens , indentation , max_line_length , start_on_prefix_line = False ) if ( fixed and check_syntax ( normalize_multiline ( fixed . lstrip ( ) ) ) ) : ( yield fixed )
shorten the line taking its length into account .