parameters: (s, from_version, to_version)
return_statement: return (last_conversion, last_change, s, errors)
docstring: Apply conversions from FROM_VERSION to TO_VERSION.  Return
  tuple (LAST,LASTCHANGED,STR,ERRORS), with the last applied conversion,
  the last conversion resulting in a change, the resulting
  string and the number of errors.
docstring_summary: Apply conversions from FROM_VERSION to TO_VERSION.  Return
  tuple (LAST,LASTCHANGED,STR,ERRORS), with the last applied conversion,
  the last conversion resulting in a change, the resulting
  string and the number of errors.
docstring_tokens: Apply conversions from FROM_VERSION to TO_VERSION . Return tuple ( LAST LASTCHANGED STR ERRORS ) with the last applied conversion the last conversion resulting in a change the resulting string and the number of errors .
function: def do_conversion(s, from_version, to_version):
      """Apply conversions from FROM_VERSION to TO_VERSION.  Return
  tuple (LAST,LASTCHANGED,STR,ERRORS), with the last applied conversion,
  the last conversion resulting in a change, the resulting
  string and the number of errors."""
      conv_list = get_conversions(from_version, to_version)
  
      ly.progress(_("Applying conversion: "), newline=False)
  
      last_conversion = None
      last_change = None
      errors = 0
      try:
          for x in conv_list:
              if x != conv_list[-1]:
                  ly.progress(tup_to_str(x[0]), newline=False)
                  ly.progress(', ', newline=False)
              else:
                  ly.progress(tup_to_str(x[0]))
              newstr = x[1](s)
              last_conversion = x[0]
              if newstr != s:
                  last_change = last_conversion
              s = newstr
  
      except convertrules.FatalConversionError:
          ly.error(_("Error while converting")
                   + '\n'
                   + _("Stopping at last successful rule"))
          errors += 1
  
      return (last_conversion, last_change, s, errors)
function_tokens: def do_conversion ( s , from_version , to_version ) : conv_list = get_conversions ( from_version , to_version ) ly . progress ( _ ( "Applying conversion: " ) , newline = False ) last_conversion = None last_change = None errors = 0 try : for x in conv_list : if x != conv_list [ - 1 ] : ly . progress ( tup_to_str ( x [ 0 ] ) , newline = False ) ly . progress ( ', ' , newline = False ) else : ly . progress ( tup_to_str ( x [ 0 ] ) ) newstr = x [ 1 ] ( s ) last_conversion = x [ 0 ] if newstr != s : last_change = last_conversion s = newstr except convertrules . FatalConversionError : ly . error ( _ ( "Error while converting" ) + '\n' + _ ( "Stopping at last successful rule" ) ) errors += 1 return ( last_conversion , last_change , s , errors )