code: def stemming(lang, input, output, encoding, pretty):
      stemmer = snowballstemmer.stemmer(lang)
      with codecs.open(output, "w", encoding) as outfile:
          with codecs.open(input, "r", encoding) as infile:
              for original in infile.readlines():
                  original = original.strip()
                  # Convert only ASCII-letters to lowercase, to match C behavior
                  original = "".join(
                      (
                          c.lower() if "A" <= c <= "Z" else c
                          for c in original
                      )
                  )
                  stemmed = stemmer.stemWord(original)
                  if pretty == 0:
                      if stemmed != "":
                          outfile.write(stemmed)
                  elif pretty == 1:
                      outfile.write(original, " -> ", stemmed)
                  elif pretty == 2:
                      outfile.write(original)
                      if len(original) < 30:
                          outfile.write(" " * (30 - len(original)))
                      else:
                          outfile.write("\n")
                          outfile.write(" " * 30)
                      outfile.write(stemmed)
                  outfile.write("\n")
  
imports: import sys
  import codecs
  import snowballstemmer
label_desc: Use image node_id 3 for calling a global function with example usage: stemming(lang, input, output, encoding, pretty) without return types