code: def _clean_string(v, sinfo):
      
      if isinstance(v, (list, tuple)):
          return [_clean_string(x, sinfo) for x in v]
      else:
          assert isinstance(v, six.string_types), v
          try:
              if hasattr(v, "decode"):
                  return str(v.decode("ascii"))
              else:
                  return str(v.encode("ascii").decode("ascii"))
          except UnicodeDecodeError as msg:
              raise ValueError("Found unicode character in template CSV line %s:\n%s" % (sinfo, str(msg)))
docs: Test for and clean unicode present in template CSVs.