code: def main():
      """
      Go through each of the given filenames or directories, convert json to .txt.xz
      """
      args = parse_args()
      if args.output is not None:
          os.makedirs(args.output, exist_ok=True)
      for filename in args.filenames:
          if os.path.isfile(filename):
              extract_file(args.output, filename, args.xz)
          elif os.path.isdir(filename):
              files = glob.glob(os.path.join(filename, "*jsonl*"))
              files = sorted([x for x in files if os.path.isfile(x)])
              print("Found %d files:" % len(files))
              if len(files) > 0:
                  print("  %s" % "\n  ".join(files))
              for json_filename in files:
                  extract_file(args.output, json_filename, args.xz)
  
file_path: stanza/stanza/utils/charlm/oscar_to_text.py
imports: import argparse
  import glob
  import json
  import lzma
  import os
  import sys
  from stanza.models.common.utils import open_read_text
label_desc: Use image node_id 3 for calling a global function with example usage: main() without return types